fix(acp): name the hung RPC method in request timeout errors - #2554
Closed
bostonaholic wants to merge 2 commits into
Closed
fix(acp): name the hung RPC method in request timeout errors#2554bostonaholic wants to merge 2 commits into
bostonaholic wants to merge 2 commits into
Conversation
A non-prompt RPC that hangs (e.g. session/new stalled on agent-side extension startup) times out with a bare "agent did not respond within 60s", leaving no clue which method the agent was stuck on. Adds a timeout-injection seam to send_request and a failing test asserting the error message names the method. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When a non-prompt RPC times out, the error now reads "Request timeout — agent did not respond to session/new within 60s" instead of dropping the method. Operators diagnosing a stalled agent from the harness log or the desktop Activity panel can see what the agent was doing (session/new stalls usually mean extension startup; initialize stalls mean the binary never came up) instead of a generic timeout that requires correlating multiple log sources. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When an agent stalls on a non-prompt RPC, the harness surfaces only
Request timeout — agent did not respond within 60s. The method name is dropped, so the desktop Activity panel and the harness log give the operator nothing to act on.This bit hard in practice: an agent hung during
session/newbecause its MCP extension startup was blocked on an unreachable package index. Five identical generic timeouts later, diagnosing required correlating the harness log, the agent's own logs, and network state by hand. An error namingsession/newwould have pointed straight at agent startup.It is not a one-off. #3729 reports OpenCode-backed agents hanging on every model, and the entire log evidence available to the reporter is three identical copies of the generic message:
The actual stall was
session/set_config_optionrejecting a permission-mode value — a different call than theinitializethe log implies. Pinning down which RPC hung took a hand-run ACP round-trip outside of Buzz.Before / after
Every stall below produced a byte-identical message before this change:
Request timeout — agent did not respond within 60sRequest timeout — agent did not respond to initialize within 60sRequest timeout — agent did not respond within 60sRequest timeout — agent did not respond to session/new within 60sRequest timeout — agent did not respond within 60sRequest timeout — agent did not respond to authenticate within 60sRequest timeout — agent did not respond within 60sRequest timeout — agent did not respond to session/set_config_option within 5sRequest timeout — agent did not respond within 5sRequest timeout — agent did not respond to set_model within 5sRequest timeout — agent did not respond within 5sRequest timeout — agent did not respond to configOption (configId=model) within 5sThe operator reads the failing subsystem straight off the line instead of inferring it from which log lines happen to sit nearby.
What
AcpError::Timeoutnow carries the RPC method:send_requestpopulates the method at both timeout sites (asend_request_with_timeoutseam makes the path testable without a 60s wait)pool.rsreport their operation the same wayTest plan
session/newand the error message names the method — confirmed failing before the fix (message had no method), passing afterbuzz-acpsuite greencargo fmt --check,cargo clippy, and workspacecargo checkclean🤖 Generated with Claude Code