You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 24, 2026. It is now read-only.
When SessionIdleEvent arrives with active background tasks but IsProcessing is already false (cleared by a prior watchdog timeout, EVT-REARM cycle, or permission recovery), the IDLE-DEFER path is a no-op — it flushes text but doesn't re-arm processing. The background tasks (sub-agents, shells) continue running but PolyPilot thinks the turn is done.
Observed
19:32:19 [IDLE-DEFER] 'PP- IC Things-worker-1' session.idle received with active background tasks
— deferring completion (IsProcessing=False, response=0+0 chars)
IsProcessing=False means the response was already finalized (truncated). The orchestrator collects a short/empty response and reports the worker as failed.
Expected
When IDLE-DEFER detects IsProcessing=false AND background tasks are active, it should re-arm IsProcessing=true (similar to EVT-REARM) so the session stays alive until the background tasks complete and a final idle (without background tasks) arrives.
Considerations
Must follow INV-2 (UI thread for mutations)
Must restart the watchdog (INV-9)
Should log [IDLE-DEFER-REARM] for diagnostics
The existing EVT-REARM path handles a similar case (TurnStart with IsProcessing=false) — the IDLE-DEFER re-arm would be analogous
Problem
When
SessionIdleEventarrives with active background tasks butIsProcessingis alreadyfalse(cleared by a prior watchdog timeout, EVT-REARM cycle, or permission recovery), the IDLE-DEFER path is a no-op — it flushes text but doesn't re-arm processing. The background tasks (sub-agents, shells) continue running but PolyPilot thinks the turn is done.Observed
IsProcessing=Falsemeans the response was already finalized (truncated). The orchestrator collects a short/empty response and reports the worker as failed.Expected
When IDLE-DEFER detects
IsProcessing=falseAND background tasks are active, it should re-armIsProcessing=true(similar to EVT-REARM) so the session stays alive until the background tasks complete and a final idle (without background tasks) arrives.Considerations
[IDLE-DEFER-REARM]for diagnosticsRelated