MCP 2.5.1 — tool reliability and response token budgets
Patch release on the 2.5.0 readiness work, fixing the two remaining classes of tool misbehavior: hangs and oversized responses.
Fixed
- Carryover/tool hang on stdio transport (#49): subprocess children inherited the MCP server's stdin — which on stdio transport is the JSON-RPC pipe — wedging tool calls while the work completed server-side. Subprocesses now get
stdin=DEVNULLunless input is piped, proven by a before/after stdio regression harness (120s hang → 3.4s). A package-wide AST hygiene test prevents reintroduction. - Runner image tag drift on upgrade (#50):
providers/settings.pyderived the CGC runner image independently and dropped the layer revision, so upgrading hosts kept a cached guard-less image. The tag now comes from the singlecgc_runner_image()derivation, with a regression test. - Crash-looping watchers reported ready:
restartingcontainers no longer count toward readiness.
Changed
- Stall watchdogs instead of total-time caps for seed/clone: GrepAI index clones are killed only after 300s of zero progress (
GREPAI_CLONE_STALL_SECONDS), never for size — copying index data instead of re-indexing is what makes rapid worktree provider deployment viable, and it scales with index size by design. - GrepAI indexing-state parity: initial-scan log markers now map to
indexing/indexedinstead ofunknown, feeding the context-packetindexingbusy list. - Response token budgets: bulk passthrough fields (raw status trees, rebind transcripts, watcher step results) move to
temp/tool-reports/<tool>/files referenced by an inlinereportPath. Inline payloads stay compact under budget tests; reports are pruned at write time (keep last 5, max 7 days) and password-redacted.
Full changes: #51