Repository navigation
fix(mcp): agents call t3_background_wait with taskIds on the first try - #47243
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The PR clarifies taskIds usage and changes Claude’s background-wait tool from deferred discovery to automatic loading. That default-loading change requires human review, although the underlying background-wait operation remains scoped to the caller’s thread. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Claude Code deferred
t3_background_waitbehindToolSearch, while the system prompts asked agents to pass "its task ID" / "its shell ID or pid". Agents routinely called the unloaded tool with singular{ taskId }/{ shellId }/{ pid }(hittingInvalidParams), or passed subagent/delegate IDs and got aninvalid_requestindistinguishable from unsupported providers.t3_background_waitwithanthropic/alwaysLoad: trueso Claude Code loads itstaskIdsschema up front.taskIds: ["<id>"]explicitly in the Claude, Cursor, and OpenCode prompts and tightent3_background_wait's description (shell/Monitor only, excluding subagents/delegates/dev servers), keepingagentContextBudget.jsonbelowmain(6392and63576bytes).t3_background_waitunmatched-task failures into error codetask_not_found(leavingunsupportedasinvalid_request) and documentt3_thread_wait'stimeoutMsdefault/max (Default 30000, max 45000.).Proof:
vp run check:changedpasses (612 tests across 6 files, includingAgentContextBudget.test.tsandcore.test.ts);evals/mcp-tool-use/run.test.ts(530 tests) and--case background-wait-uses-task-ids-array --dry-runconfirmt3_background_waitloads up front with itstaskIdsschema (live Claude eval samples were not run here becauseANTHROPIC_API_KEYis unavailable).Reviewed with sol-loop: 2 passes with GPT-6.2 Sol. Sol verdict: approved.
Created with Gemini 4 Neon in Antigravity.