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
FlushCurrentResponse on AssistantTurnEndEvent persists 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
Problem
Some copilot CLI sessions never emit a
session.idleevent after the turn completes. This meansCompleteResponsenever fires, leavingIsProcessing=trueuntil the watchdog kills it.Current workaround
FlushCurrentResponseonAssistantTurnEndEventpersists content so it's not lostRoot cause
Unknown — appears to be a copilot CLI/SDK bug in headless mode. The SDK emits
assistant.turn_endbut never follows withsession.idle.Desired fix
Investigate why
session.idleis 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