fix(acp): name the hung RPC method in request timeout errors#2554
Open
bostonaholic wants to merge 2 commits into
Open
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>
bostonaholic
marked this pull request as ready for review
July 23, 2026 16:45
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.What
AcpError::Timeoutnow carries the RPC method, and the message reads: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 waysession/newstall now reads as "agent stuck in startup/extension load"; aninitializestall as "agent binary never came up"Test plan
session/newand the error message names the method — confirmed failing before the fix (message had no method), passing afterbuzz-acpsuite: 534 passedcargo fmt --check,cargo clippy, and workspacecargo checkclean🤖 Generated with Claude Code