-
Notifications
You must be signed in to change notification settings - Fork 31
Zero-idle sessions: SDK never emits session.idle event #299
Copy link
Copy link
Closed
PureWeen/copilot-sdk
#2Labels
bugSomething isn't workingSomething isn't workingexternalUpstream bug or dependency issueUpstream bug or dependency issue
Description
Problem
Some copilot CLI sessions never emit a session.idle event after the turn completes. This means CompleteResponse never fires, leaving IsProcessing=true until the watchdog kills it.
Current workaround
FlushCurrentResponseonAssistantTurnEndEventpersists content so it's not lost- 5-second heartbeat timer in Dashboard catches missed UI renders
- Watchdog eventually clears stuck processing state
Root cause
Unknown — appears to be a copilot CLI/SDK bug in headless mode. The SDK emits assistant.turn_end but never follows with session.idle.
Desired fix
Investigate why session.idle is missing and fix at the SDK level. Once fixed, the heartbeat interval can be relaxed from 5s to 15-30s (keep as defense-in-depth).
References
- PR Session resilience: heartbeat timer, permission auto-recovery, activity-aware watchdog #285 (heartbeat + liveness signal)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingexternalUpstream bug or dependency issueUpstream bug or dependency issue