feat(background-agent): use "interrupt" status for promptAsync errors
Change promptAsync catch blocks to set status = "interrupt" instead of "error". This distinguishes prompt errors from stale timeouts (cancelled) and TTL expirations (error). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -164,7 +164,7 @@ export async function startQueuedTask(args: {
|
||||
const existingTask = findBySession(sessionID)
|
||||
if (!existingTask) return
|
||||
|
||||
existingTask.status = "error"
|
||||
existingTask.status = "interrupt"
|
||||
const errorMessage = error instanceof Error ? error.message : String(error)
|
||||
if (errorMessage.includes("agent.name") || errorMessage.includes("undefined")) {
|
||||
existingTask.error = `Agent "${input.agent}" not found. Make sure the agent is registered in your opencode.json or provided by a plugin.`
|
||||
|
||||
Reference in New Issue
Block a user