Repository navigation
fix(contracts): delegate_task options example says ids differ by provider - #40806
Conversation
…ider
The target.options description gave {effort:'max'} as its only example,
a Claude option id. Codex models expose reasoningEffort, so an agent that
copied the example was rejected and had to retry. The description now says
option ids differ by provider and shows both.
Fixes #32850
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dget Drop the per-provider examples so the tool list is no larger than main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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. |
The
delegate_tasktool told agents thattarget.optionstakes values "such as {effort:'max'}", buteffortis a Claude option id. Codex models call itreasoningEffort, so an agent that followed the example when delegating to Codex was rejected with "Unknown option effort" and had to retry. The description now says option ids vary by provider and points toorchestrator_capabilitiesfor each model's ids.packages/contracts/src/orchestratorMcp.ts: newtarget.optionsdescription, without the Claude-only example.apps/server/src/provider/agentContextBudget.json:mcpToolListJsonByteslowered to the new, smaller size.Fixes #32850
Reproduction on main
Commit: origin/main 379a98a. (1) Read the delegate_task target.options description on main: packages/contracts/src/orchestratorMcp.ts:113 still reads "Options from
orchestrator_capabilities, such as {effort:'max'}." (2) From a Claude (claude-opus-5-5) thread on this VM's T3 server, called orchestrator_capabilities: every Codex model (gpt-6.2-sol, gpt-6.2-astra, gpt-6.1-terra, gpt-6.1-sol, gpt-6-astra, gpt-6-luna) lists only reasoningEffort and serviceTier. The delegate_task tool schema the agent receives carries the {effort:'max'} example word for word. (3) Called delegate_task with target {providerInstanceId:'codex', model:'gpt-6-luna', options:{effort:'high'}}. It was rejected: "Model gpt-6-luna on provider codex rejected options: Unknown option effort; supported options: reasoningEffort, serviceTier." No child was started. That live call ran on the VM's T3 build, not a dev server on main. (4) In an origin/main worktree, ran the existing OrchestratorMcpService.test.ts case for the 'Unknown option' rejection: it passes, so main has the same exact-match check (invalidOptionSelections) and no alias from effort to reasoningEffort. As the earlier maintainer run on #34792 found, a fresh agent that reads orchestrator_capabilities first picks reasoningEffort correctly. The failure needs an agent to copy the example or write it from memory, for example after compaction.Evidence
Read the live MCP tool schema, request Codex capabilities, then submit the reported invalid
options:{effort:'high'}call on both commits. Environment: Linux source servers, fresh isolated databases, synthetic active replay parent threads.{effort:'max'}without a provider qualification.orchestrator_capabilities.Both servers list
reasoningEffortandserviceTierfor Codex and reject the deliberately invalideffortcall. The fix corrects guidance; it does not introduce an alias.Raw responses: base, head. Reproduction files: driver, replay wrapper, seed and launch.
Not shown:
Tests
vp test run apps/server/src/mcp/OrchestratorMcpService.test.ts: 97 passedvp test run apps/server/src/provider/AgentContextBudget.test.ts: passes with mcpToolListJsonBytes 59170 (main: 59192)vp run check:changed: format, lint, knip, graphql, typecheck (39 packages) and tests (2 files) all passNot in this change
effortas an alias forreasoningEfforton Codex models (or the reverse), but that changes validation behaviour and is a separate change.effort, CodexreasoningEffort) were left out of the description because they would grow the agent context, which needs the agent-context-increase label.Who did the work
Run by the t3code factory in T3 Code.