Agents window froze when marking a nested agent-host chat Done just after its Autopilot turn ended
Does this issue occur when all extensions are disabled?: Not tested.
- VS Code Version: 1.146.0 (Universal), commit
69047191fc427f2f92828279aae1d90d8eeda7ab - OS: macOS (arm64) client; Agents window connected over SSH to a Linux agent host (Copilot provider)
Summary
Clicking Done on a nested chat froze the Agents window seconds after that chat's Autopilot turn ended. The agent host saw the client stop sending data and closed the transport after the 30s liveness timeout. The window had to be reloaded, and the chat was not archived.
Steps
- In a remote agent-host session that has several nested chats (here: the main chat plus 7 nested chats, 5 of them already Done), run a nested chat in Autopilot with Auto (Copilot Fusion Max).
- Let the turn end with the
task_completetool. This turn was a Fusion cascade, so the host had started internal judge and repair subagent turns parented to the chat 7s and 0.1s beforetask_complete. - Click Done for that nested chat shortly afterwards.
Expected: the chat is marked Done and the window stays responsive.
Actual: the window stopped responding. After the reload, list_sessions still reports the chat as not archived.
Host-side evidence
Agent host log (UTC, IDs elided):
21:39:27.209 [Copilot:…] Tool started: task_complete
21:39:27.303 [Copilot:…] Session idle
21:40:03.411 [ProtocolServer] Client liveness: no data from <client A> for 30001ms; closing transport.
21:40:03.413 [ProtocolServer] Client disconnected: <client A>, subscriptions=18
21:40:18.880 [ProtocolServer] Initialize: clientId=<client B>, protocolVersions=[1.0.0, 0.10.0, 0.9.0]
The client's last data therefore arrived about 6s after the chat went idle, and the host kept serving other agent turns, which ran tools at 21:39:37 and 21:39:46. The stall appears to be on the client. Other nested chats in the same session were archived earlier, including one whose agent had called task_complete 10 times, so task_complete followed by Done does not always hang.
Client-side evidence
The client log follow-up confirms renderer unresponsiveness, with both sample sets in regex line filtering (fbt.filter → findMatchesLineByLine). The samples do not include the Done handler, so the path from that click to the filter remains unconfirmed.
Not collected
- Whether it reproduces without Autopilot, without Fusion, or after the chat has been idle longer.
Related: #345481 was a renderer hang while the Sessions list rebuilt during provider restoration (closed for 1.148.0). Whether this hang shares that path has not been established. #345611 would let an agent mark its own chat Done after the turn ends, which would avoid the manual click here.
Filed by an AI assistant on the user's explicit request, initially from the agent host's logs; client-side logs were subsequently collected in the linked follow-up.
Mac client evidence: this is a renderer main-thread hang, not just a transport stall. Both unresponsive sample sets place the renderer in a regex line filter, fbt.filter → findMatchesLineByLine. About 28s elapsed between the first unresponsive detection and the last sample report before reload.
Client is VS Code 1.146.0 Stable on macOS. Local time is UTC-8 (PST), so local 13:39:33 = 21:39:33Z.
| UTC | Source | Event |
|---|---|---|
| 21:39:33.388 | renderer.log | Last renderer log line, immediately after the entry at 21:39:33.387 (disposing session …). It matches the host's "last data ≈21:39:33Z". Nothing is logged after it. |
| 21:39:49.396 | main.log | CodeWindow: detected unresponsive |
| 21:40:04.398 | main.log | CodeWindow unresponsive samples: 14 samples, all in the same filter call chain |
| 21:40:05.816 | main.log | CodeWindow: detected unresponsive (second report) |
| 21:40:17.693 | main.log | Second sample set, 11 samples, same stack |
| 21:40:17.7 | exthost.log, agenthost.log | Extension host: renderer closed the MessagePort. Local agent-host log: [ProtocolServer] Client disconnected (the reload tearing the window down) |
Samples were in sessions.desktop.main.js, innermost first (the 14-sample set had a similar stack, ending in RegExp.exec or String.replace):
Sampled stack (11 samples, 21:40:17Z; minified names)
RegExp.exec
EY.next (80:2386)
qmi.findMatchesInNode (282:14694)
qmi.findMatchesLineByLine (282:15325)
s.findMatchesLineByLine (292:3060)
Cv.findMatchesLineByLine (306:3485)
p / Array.map
Cv.findMatches (307:169)
fbt.shouldShowLine (3951:24729)
fbt.compute (3951:25525)
fbt.filterIncremental (3951:24009)
fbt.filter (3951:23912)
fbt.onDidChangeModel (3951:23596)
L._deliver / _deliverQueue / fire
el.setModel (316:705)
wXt.setInput (1228:98103)
async wXt.setInput (3951:22395)
The 14-sample set: 8 samples at I (282:14667), 5 at RegExp.exec, 1 at String.replace via gR.parseSearchRequest. All have the same findMatches → shouldShowLine → fbt.filter → fbt.onDidChangeModel → el.setModel → wXt.setInput tail.
Reading:
- The renderer's JS thread was sampled in
fbt.filter→shouldShowLine→Cv.findMatches(a per-line regex search), reached fromsetInput→el.setModel→onDidChangeModel. The first unresponsive detection was at 21:39:49Z; the last sample report was at 21:40:17Z, about 28s later. The wider interval from the last renderer log at 21:39:33Z to reload was about 44s; that alone does not prove the renderer spent all 44s in this call chain. - That fits the host's liveness timeout: a blocked renderer can't send. The host saw the connection die at 21:40:03Z. The SSH and agent-host transports themselves showed no errors.
- The sampled stacks don't include the Done handler itself. The last renderer.log entry is a chat-model dispose at 21:39:33.387 (
_cancelPromptOptionsRefresh→Cv.setValue) whose logged stack includes anonClickhandler, i.e. a UI click. - I can't say which editor or view owns
fbt. The names are minified and there is no CPU profile.
Checked, nothing relevant:
- main.log, 21:39–21:41Z: no renderer crash,
render-process-goneorrecovered from unresponsive. - sharedprocess logs and the old and new windows' renderer.log, 21:39–21:41Z: no errors or warnings, apart from a benign
Canceledin exthost.log at reload and unrelated extension warnings. - The output-channel logs for the two SSH agent hosts and for agent sessions: last write 21:39Z, no disconnect or reconnect entries.
~/Library/Logs/DiagnosticReportsand/Library/Logs/DiagnosticReports: no hang, spin or crash report for Code or Code Helper in the window (only unrelated third-party reports).
Added by an AI assistant on the user's request, from the client's logs on the Mac.