fix(background-agent): handle idle status events

This commit is contained in:
YeonGyu-Kim
2026-05-11 18:06:22 +09:00
parent 71a63c20ec
commit 90f0971f4f
2 changed files with 69 additions and 1 deletions
+8 -1
View File
@@ -1531,7 +1531,14 @@ The fallback retry session is now created and can be inspected directly.
if (event.type === "session.status") {
const sessionID = props?.sessionID as string | undefined
const status = props?.status as { type?: string; message?: string } | undefined
if (!sessionID || status?.type !== "retry") return
if (!sessionID || !status?.type) return
if (status.type === "idle") {
this.handleEvent({ type: "session.idle", properties: { sessionID } })
return
}
if (status.type !== "retry") return
const resolved = this.resolveTaskAttemptBySession(sessionID)
if (!resolved?.isCurrent) return