Repository navigation
Description
Browser client tools never return: completions forwarded with source=client-dispatch are never delivered to the pending tool_use
Summary
Every browser client tool call (readPage, openBrowserPage, runPlaywrightCode, …) hangs indefinitely in the VS Code–based desktop app. The tool itself succeeds — the page is read in tens of milliseconds and a completion is forwarded — but the result never reaches the agent's pending tool_use. There is no timeout and no rejection, so the turn sits on "Processing" until the user interrupts, which surfaces to the model as AbortError: interrupt.
The distinguishing signal is the source= tag on the completion. In one session, agenthost.log forwarded 44 client tool completions:
source= |
count | tools | outcome |
|---|---|---|---|
server-envelope |
41 | Bash, Read, Write, … | all delivered normally |
client-dispatch |
3 | openBrowserPage, runPlaywrightCode, readPage |
all three hung |
One-to-one, no exceptions. Every browser tool went down the client-dispatch path, and every client-dispatch completion was lost.
Where the code lives
All of the identifiers below are in VS Code core, not in the agent extension:
out/vs/platform/agentHost/node/agentHostMain.js
Confirmed by string search across the app bundle vs. the installed extension:
| string | core files | extension files |
|---|---|---|
AgentSideEffects |
1 | 0 |
client-dispatch |
1 | 0 |
claudeToolCallRegistry |
1 | 0 |
Forwarding client tool completion |
1 | 0 |
openBrowserPage / readPage |
3 | 0 |
withContext |
2 | 0 |
The browser tools themselves are core-provided, so this is not an extension-side defect.
Evidence
agenthost.log / window1/renderer.log, timestamps aligned:
20:29:07.751 [info] [AgentHost] Running client tool: openBrowserPage (callId=toolu_01UR…, withContext=true)
20:29:08.923 [info] [AgentSideEffects] Forwarding client tool completion: source=client-dispatch
-> never delivered; user interrupted
20:30:13.116 [info] [AgentHost] Running client tool: runPlaywrightCode (callId=toolu_0177…, withContext=true)
20:30:13.177 [info] [AgentSideEffects] Forwarding client tool completion: source=client-dispatch
-> never delivered; user interrupted
20:36:44.216 [info] [AgentHost] Running client tool: readPage (callId=toolu_0171…, withContext=true)
20:36:44.285 [info] [AgentSideEffects] Forwarding client tool completion: source=client-dispatch
-> never delivered; user interrupted
Note the third pair: 69 ms from dispatch to completion. The page was read successfully. The result was simply never routed back.
Corroborating lines:
[claudeToolCallRegistry] turn request_<uuid> ended with pending tool_use toolu_<id>; dropping cross-message state
ChatService#cancelCurrentRequestForSession: No pending request was found for session <session>. requestInProgress=false
The second one matters: while AgentHost holds an unresolved client tool, ChatService believes no request is in progress. So the call is also uncancellable — pressing stop reports nothing to cancel.
Steps to reproduce
- Open any page in the built-in browser and share it with the agent.
- Ask the agent to read the page (
readPage). - The call never returns.
agenthost.logshows the completion forwarded within ~100 ms withsource=client-dispatch.
Ruled out by measurement
Each of these was tested and eliminated, so the report isn't a guess about page content:
- Page size / DOM complexity — 2288 DOM nodes.
- Dev server — HTTP 200 in 0.18 s.
- Network settling —
networkidlereached in 473 ms; zero requests in flight over a 3 s window. - Infinite CSS animations — 5 present (
spin,pulse, an indeterminate progress bar); harmless. Failed to capture browser view screenshot— appears in only 3 of many hangs; two hangs logged no capture error at all. A co-occurring symptom, not the cause.- Tab visibility — the 69 ms successful read happened with the tab not visible.
- Wedged subsystem — a full window reload did not fix it.
Independently verified the same page with headless Playwright (playwright-core): goto 314 ms, load 89 ms, networkidle 473 ms, screenshot() 72 ms. The page is entirely healthy.
Secondary bug: messages sent during a hang never render
A message typed while a tool call is pending does reach the model — it is enqueued as steering:
[Claude] setPendingMessages … steering=request_<uuid>
[Claude:<id>] injectSteering: enqueued id=request_<uuid> sdkUuid=request_<uuid>
But the UI then subscribes to a changeset resource keyed by that steering request id, which is never created:
[ProtocolServer] Request 'subscribe' failed Resource not found: claude:/<session>/changeset/turn/request_<uuid>
The subscribe fails and the message bubble never draws. The user sees their message vanish and retypes it, while the model has already received it. Four interjections in one session produced exactly four such failures.
Impact
The browser tooling is unusable in this build, and the two bugs compound badly: the tool hangs, stop does nothing, and the user's attempt to interject appears to fail silently. Users burn turns retyping messages that already arrived.
Environment
- VS Code
1.136.2stable, commit88e44fa0e00b08f7758b4f6d05632e4fd5e4df6f - macOS, Darwin 25.6.0 (arm64)
- Agent extension:
anthropic.claude-code2.1.266 - Page under test served from a local dev server over
http://localhost
Worth noting for triage: GitHub Copilot's browser tooling, in the same window and against the same shared tab, is unaffected — it does not go through the agent host's client-tool dispatch path. So the shared browser view and the page itself are demonstrably fine; only the client-dispatch completion route is broken.
Activity
romanrokon commentedon Oct 1, 2026
Another variant with the same visible symptom, on the Claude harness (VS Code 1.140.0,
@anthropic-ai/claude-agent-sdk0.3.281, macOS 27). The completion isn't lost here; the agent host never forwards the browser call at all.Sequence (agenthost.log and the session transcript, local times):
[Claude] session <id>: resume rebuild agent=(none). VS Code had just restarted and reopened an existing session.queue yielded sdkUuid=request_a517… turnId=request_a517…result for sdkUuid=request_a517…. From then on the UI treats the turn as finished: the send button comes back and no progress is shown.mcp__client__*browser tools). None of this is shown in the UI.tool_useformcp__client__openBrowserPage. agenthost.log has no line at all after 12:28:29: no tool call, noclient-dispatch, no completion. The SDK process stays alive and idle, waiting on that tool_use indefinitely.So in this case the browser tool is never dispatched to the client, because the agent host already ended the turn when the resumed session's first prompt arrived. Server-side tools before it ran fine, but they were invisible as well. That looks like the same "stops forwarding turn events" family as #335299, triggered here by a session resume instead of a screenshot.
Workaround: reload the window (this ends the stuck SDK process) and resend the prompt in a new session.
mmontagnana commentedon Oct 12, 2026
Still reproduces today on VS Code 1.141.0 stable (Claude Agent SDK 0.3.296, manually placed in place of the bundled 0.3.281; the same drop also reproduced on the bundled 0.3.258, see below), macOS arm64, local window, Claude harness, single window, brand-new chat.
One
openBrowserPagefollowed by onereadPageon https://example.com, both going throughsource=client-dispatch(times UTC, fromagenthost.logand the session transcript):Same path, same chat, same page: the slow call (1.9 s) is delivered, the fast one (23 ms) is lost. That fits the race described in #330730: a result that reaches
respondbefore the SDK has registered its handler is dropped (Copilot survives because it usesrespondOrBuffer). It also explains why this looks intermittent:openBrowserPageusually takes long enough to win the race,readPage/screenshotPageusually don't.The error text above is the same as the title of #335400, so that one looks like the same bug as well. Earlier trace-level timeline on 1.139.0 / SDK 0.3.258: #322990 (comment)
Notes for triage:
tool_result), so the turn is not uncancellable, just stuck until interrupted.Happy to re-test on macOS with a build containing a fix. Giuseppe Cianci (@Giuspepe) this is assigned to you and still
triage-needed/stale. Could it get a look?romanrokon commentedon Oct 13, 2026
Seeing what looks like the same hang on VS Code 1.141.0 (commit 2a59476), macOS 27.0.1 arm64. Setup: Agents window with the built-in Claude agent (
agent-host-claude), Claude Agent SDK 0.3.281 (CLI 2.1.281), signed in with a Claude subscription. No API key and no Copilot are involved.openBrowserPage({"url":"http://localhost:3005/"})was issued at 10:19:42 local. It returned nothing until the turn was cancelled at 10:24:43, and the agent then got "The tool call was interrupted before a result was received."One difference from this report: in my case the renderer never logged
[AgentHost] Running client tool: openBrowserPagefor that call. The window'srenderer.loghas noRunning client toolline at all for that session. So the call seems never to have reached the client, rather than its completion being dropped:After restarting VS Code, the same tool dispatched and returned normally. Related: #341248, a failure in the same tool after choosing "Yes, share" on an existing tab.
kycutler commentedon Nov 6, 2026
Related: #322990
michael-mcclintock commentedon Nov 10, 2026
Also reproducing on VS Code 1.145.2 stable, macOS arm64, local Agents window, Copilot CLI harness (
agent-host-copilotcli), not only Claude.In this case the call never reaches the window at all:
agenthost.log:Tool started: openBrowserPageat 18:14:06, then nothing untilAborting sessionat 18:31:29 (user cancel). NoForwarding client tool completionfor it.renderer.log: hasRunning client tool: tool_search_toolfor the call two seconds earlier, but noRunning client tool: openBrowserPage.permission.requestedfor the call, so it isn't waiting on an approval.Frequency across 6 VS Code sessions from Nov 1 to Nov 9: 22 of 24
openBrowserPagecalls hung for 2–20 minutes until cancelled. The URL made no difference (about:blank,http://localhost:5173/,https://github.com/...,https://example.com-type public pages).Workaround that works: the Playwright MCP server (
@playwright/mcp) configured in~/.copilot/mcp-config.jsonruns in the agent host, outside the window, and returns normally (start plus two navigations took 3.7s).GNeras commentedon Nov 27, 2026
On 1.148.0 the hang of fast client tools (
readPage,screenshotPage,problems…) on the Claude harness is still the result race from #322990: a deterministic repro, a breakpoint capture and a tested workaround are in #322990 (comment). With any permission mode other than Bypass there's a second, separate drop at the permission gate: #350630.