feat(background-agent): handle "interrupt" in notifications, output, and formatting

Update notification systems to display INTERRUPTED status.

Add interrupt handling to background_output tool (terminal status).

Add interrupt-specific status note to formatTaskStatus.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-02-09 18:26:16 +09:00
parent 5b34a98e0a
commit 498fda11a0
6 changed files with 37 additions and 29 deletions
@@ -32,20 +32,24 @@ ${truncated}
\`\`\``
}
let statusNote = ""
if (task.status === "pending") {
statusNote = `
let statusNote = ""
if (task.status === "pending") {
statusNote = `
> **Queued**: Task is waiting for a concurrency slot to become available.`
} else if (task.status === "running") {
statusNote = `
} else if (task.status === "running") {
statusNote = `
> **Note**: No need to wait explicitly - the system will notify you when this task completes.`
} else if (task.status === "error") {
statusNote = `
} else if (task.status === "error") {
statusNote = `
> **Failed**: The task encountered an error. Check the last message for details.`
}
} else if (task.status === "interrupt") {
statusNote = `
> **Interrupted**: The task was interrupted by a prompt error. The session may contain partial results.`
}
const durationLabel = task.status === "pending" ? "Queued for" : "Duration"