Skip to content

fix(acp): name the hung RPC method in request timeout errors#2554

Open
bostonaholic wants to merge 2 commits into
block:mainfrom
bostonaholic:bostonaholic--acp-timeout-method-context
Open

fix(acp): name the hung RPC method in request timeout errors#2554
bostonaholic wants to merge 2 commits into
block:mainfrom
bostonaholic:bostonaholic--acp-timeout-method-context

Conversation

@bostonaholic

Copy link
Copy Markdown
Contributor

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/new because 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 naming session/new would have pointed straight at agent startup.

What

AcpError::Timeout now carries the RPC method, and the message reads:

Request timeout — agent did not respond to session/new within 60s
  • send_request populates the method at both timeout sites (a send_request_with_timeout seam makes the path testable without a 60s wait)
  • The model-switch and permission-mode timeouts in pool.rs report their operation the same way
  • A session/new stall now reads as "agent stuck in startup/extension load"; an initialize stall as "agent binary never came up"

Test plan

  • New unit test: a silent agent times out on session/new and the error message names the method — confirmed failing before the fix (message had no method), passing after
  • Full buzz-acp suite: 534 passed
  • cargo fmt --check, cargo clippy, and workspace cargo check clean

🤖 Generated with Claude Code

bostonaholic and others added 2 commits July 23, 2026 09:56
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
bostonaholic marked this pull request as ready for review July 23, 2026 16:45
@bostonaholic
bostonaholic requested a review from a team as a code owner July 23, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant