Skip to content

docs: clarify two-layer MCP timeout config (#2)#3

Merged
sshahzaiib merged 3 commits into
mainfrom
docs/issue-2-timeout-layers
Jun 17, 2026
Merged

docs: clarify two-layer MCP timeout config (#2)#3
sshahzaiib merged 3 commits into
mainfrom
docs/issue-2-timeout-layers

Conversation

@sshahzaiib

Copy link
Copy Markdown
Owner

Resolves #2.

What

Documents that there are two separate timeouts at play and they must be aligned:

  • agy-side per-tool budgets (already documented)
  • client-side MCP tool-call timeout (Claude Code) — the one that actually produced the reporter's Error: timed out waiting for response

Adds a "Two timeout layers — align them" section to the README with:

  • the client-vs-agy distinction and how to tell which one fired
  • a per-server .mcp.json "timeout" example + MCP_TOOL_TIMEOUT note
  • the client timeout >= agy budget rule of thumb
  • an expected-latency note (~40–50s cold start, ≈46s observed)

Why

The reporter hit a client timeout below agy's analyze_files budget, so Claude Code gave up while the agy session kept running (recoverable via follow_up). The fix is config, not code — but the client-side layer was undocumented.

Verification

Reproduced from scratch by driving the MCP server over stdio and varying only the client read deadline:

Client deadline Outcome Time
8s (too short) timed out waiting for response 8.2s
600s (adequate) ✅ result received 45.8s

Docs-only change — no code touched.

Document that the MCP client (Claude Code) has its own tool-call timeout
separate from agy's per-tool budget; if it's shorter, the client gives up
with 'timed out waiting for response' while the agy session keeps running.

Adds a 'Two timeout layers — align them' section with the per-server
.mcp.json timeout example, the client >= agy rule, and an expected-latency
note (~40-50s cold start) so users size client timeouts correctly.

Closes #2
Switch the install command to 'claude mcp add-json' with a baked-in
"timeout": 600000 so users get a 10-min client-side tool-call deadline at
install time, instead of discovering it only after a timeout. Note the
MCP_TOOL_TIMEOUT env fallback for clients that don't honor per-server timeout.
@sshahzaiib sshahzaiib merged commit 33fbec8 into main Jun 17, 2026
1 check passed
@sshahzaiib sshahzaiib deleted the docs/issue-2-timeout-layers branch June 17, 2026 23:24
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.

Title: analyze_files and web_lookup tools are very slow / frequently timeout

1 participant