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 }}
Repository navigation
WSL session stays running after the agent's turn ends: Stop button and thinking timer don't clear #5311
Same bug on macOS, app 1.4.0 (runtime 1.0.106-8), with a Mission Control "user-local" remote host (copilotd on a Linux VM), so this isn't WSL-specific. It's the general remote-host idle path. It also suppresses the "done" desktop notification, which is the bigger problem for me. I went through the app logs, data.db, and the shipped frontend bundle; details below.
Impact (my logs, Nov 5–14, 518 remote turn completions)
Only 46% produced a timely agent_idle activity (the "done" notification) within 60 s. 51% got it late (median 67 min, typically when the host reconnected and history was rebuilt), and 3% never.
About 47% of remote turn-ends left the UI showing "Thinking" (the session store stays loading) until I pressed Stop or restarted the app. The backend has sessions.is_running = 0 the whole time.
What happens
On a timely completion, chat/turnComplete is immediately followed by keep_awake: Session became idle, the idle hooks run, and agent_idle is created.
On a failed completion, no idle is emitted. The backend falls back to remote root idle reconciliation, which never settled in 259 attempts (work_qualified=false):
Reason
Count
work_state_unqualified
88
delivery_changed
48
host_not_idle
44
tracked_work
40
stale_snapshot
37
send_in_flight
2
After the first rejection, later probe_session_liveness requests (10k+) never re-run reconciliation.
Once one idle is missed, more follow. The app treats the session as busy and queues the next message as chat/pendingMessageSet. That produces a host-originated copilot-turn-* turn, and those got a timely notification only 25% of the time, versus 68% for app-dispatched turns. Coordinated cross-session fan-out makes this common.
Example: a host turn completes, reconciliation rejects it, and no idle or notification follows. agent_idle for that session was created only ~2 h later, at the next host reconnect.
INFO remote event pump: translated action action_type="chat/turnComplete" action_detail=turn_id=copilot-turn-40729a85…
INFO idle_reconciliation: remote root idle reconciliation input_source="root_summary_read" … work_qualified=false reason="tracked_work"
Suggested fixes
When the host reports the root idle, emit session.idle and create the agent_idle activity on a remote chat/turnComplete. Fix the reconciliation qualification; it never succeeds here.
Let the frontend watchdog apply the existing idle repair to remote sessions when the probe or backend reports not running, and re-run reconciliation on probes.
dispatch_backfill logs "skipping SessionHistoryBackfillComplete — delivered history will clear the FE spinner" on every reconnect even when no history was delivered. It should not skip in that case.
Minor: chat/backgroundWorkSet and chat/backgroundWorkRemoved translate to 0 frontend events, and remote read_bash returns terminal content. The frontend can then keep phantom running shells, which stop session.task_complete from clearing the loading state.
Workaround: pressing Stop clears it when the host is already idle; for remote sessions it only sends an abort to the host and clears local state. Restarting the app also clears it.
This issue looks like it was routed to the Azure DevOps canvas team. The bug is in the remote-session idle and liveness path, so it may need re-routing.
Activity
roboserg commentedon Nov 4, 2026
@chuwik @Clancey
real bug, reproduced constantly in new WSL sessions
meozhang commentedon Nov 9, 2026
Thanks for the feedback. We've logged this with the Azure DevOps canvas team.
roboserg commentedon Nov 9, 2026
Thanks!
maxluk commentedon Nov 14, 2026
Same bug on macOS, app 1.4.0 (runtime 1.0.106-8), with a Mission Control "user-local" remote host (copilotd on a Linux VM), so this isn't WSL-specific. It's the general remote-host idle path. It also suppresses the "done" desktop notification, which is the bigger problem for me. I went through the app logs,
data.db, and the shipped frontend bundle; details below.Impact (my logs, Nov 5–14, 518 remote turn completions)
agent_idleactivity (the "done" notification) within 60 s. 51% got it late (median 67 min, typically when the host reconnected and history was rebuilt), and 3% never.sessions.is_running = 0the whole time.What happens
On a timely completion,
chat/turnCompleteis immediately followed bykeep_awake: Session became idle, the idle hooks run, andagent_idleis created.On a failed completion, no idle is emitted. The backend falls back to
remote root idle reconciliation, which never settled in 259 attempts (work_qualified=false):work_state_unqualifieddelivery_changedhost_not_idletracked_workstale_snapshotsend_in_flightAfter the first rejection, later
probe_session_livenessrequests (10k+) never re-run reconciliation.The frontend liveness watchdog (the Queued messages can get stuck while an inactive session remains in Running state after completion #3525 / macOS 1.1.22: sessions fail to report completion, queueing fails, and work appears stalled #4031 / Queued user messages are silently dropped and missing from durable session history #3590 fix) can't repair it. Its probe-result handler returns early for remote execution locations, before the
isRunning === false→setSessionLoading(false)idle repair that local sessions get. One stuck session was probed about 4,500 times over 38 h with no effect.Once one idle is missed, more follow. The app treats the session as busy and queues the next message as
chat/pendingMessageSet. That produces a host-originatedcopilot-turn-*turn, and those got a timely notification only 25% of the time, versus 68% for app-dispatched turns. Coordinated cross-session fan-out makes this common.Example: a host turn completes, reconciliation rejects it, and no idle or notification follows.
agent_idlefor that session was created only ~2 h later, at the next host reconnect.Suggested fixes
session.idleand create theagent_idleactivity on a remotechat/turnComplete. Fix the reconciliation qualification; it never succeeds here.dispatch_backfilllogs "skipping SessionHistoryBackfillComplete — delivered history will clear the FE spinner" on every reconnect even when no history was delivered. It should not skip in that case.chat/backgroundWorkSetandchat/backgroundWorkRemovedtranslate to 0 frontend events, and remoteread_bashreturns terminal content. The frontend can then keep phantom running shells, which stopsession.task_completefrom clearing the loading state.Workaround: pressing Stop clears it when the host is already idle; for remote sessions it only sends an abort to the host and clears local state. Restarting the app also clears it.
This issue looks like it was routed to the Azure DevOps canvas team. The bug is in the remote-session idle and liveness path, so it may need re-routing.