Skip to content

fix(contracts): delegate_task options example says ids differ by provider - #40806

Merged
juliusmarminge merged 2 commits into
mainfrom
factory/issue-32850-a34792
Nov 22, 2026
Merged

juliusmarminge merged 2 commits into
mainfrom
factory/issue-32850-a34792

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

The delegate_task tool told agents that target.options takes values "such as {effort:'max'}", but effort is a Claude option id. Codex models call it reasoningEffort, 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 to orchestrator_capabilities for each model's ids.

  • packages/contracts/src/orchestratorMcp.ts: new target.options description, without the Claude-only example.
  • apps/server/src/provider/agentContextBudget.json: mcpToolListJsonBytes lowered 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.

Before After
356dff3352 493fff137f
Live MCP transcript: advertises {effort:'max'} without a provider qualification. Live MCP transcript: says IDs vary by provider and points to orchestrator_capabilities.

Both servers list reasoningEffort and serviceTier for Codex and reject the deliberately invalid effort call. The fix corrects guidance; it does not introduce an alias.

Raw responses: base, head. Reproduction files: driver, replay wrapper, seed and launch.

Not shown:

  • Model behavior after compaction was not exercised: the driver deterministically submitted the reported option rather than asking a Claude model to choose it. The served schema and real server rejection were verified on both commits.
  • Successful Codex child execution was not exercised; this fix changes tool guidance, and the reported invalid call is rejected before provider execution.

Tests

  • vp test run apps/server/src/mcp/OrchestratorMcpService.test.ts: 97 passed
  • vp 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 pass
  • PR CI on 493fff1: all 37 checks pass, including Agent context budget
  • mcp-tool-use eval: not run, no ANTHROPIC_API_KEY on this VM

Not in this change

  • The server could accept effort as an alias for reasoningEffort on Codex models (or the reverse), but that changes validation behaviour and is a separate change.
  • No mcp-tool-use eval case reproduces an agent copying the options example for a Codex delegation; adding one needs a paid eval run.
  • Per-provider examples (Claude effort, Codex reasoningEffort) were left out of the description because they would grow the agent context, which needs the agent-context-increase label.

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

…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>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 22, 2026
…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>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The target.options description now states that option IDs vary by provider and points to orchestrator_capabilities. The agent context budget value changes from 59192 to 59170 bytes.

Changes: Provider-specific option guidance

Layer / File(s) Summary
Option guidance and context budget
packages/contracts/src/orchestratorMcp.ts, apps/server/src/provider/agentContextBudget.json
The options description points to orchestrator_capabilities for provider-specific IDs and retains the override and clearing guidance. The mcpToolListJsonBytes value changes from 59192 to 59170.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other · Severity of issue fixed: Low

Possibly related issues

Possibly related PRs

Suggested reviewers: macroscopeapp, maria-rcks, shivamhwp

Merge Risk: Minimal · up to 493ff

This updates the delegate_task option guidance so callers are told that option IDs vary by provider and are pointed to orchestrator_capabilities. It is a documentation-only change with a matching context-budget adjustment and no runtime impact. It is ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: the delegate_task options example in the contracts package says option IDs differ by provider. It is a conventional commit, short, and matches the diff, which rewords the t…
Linked Issues check Passed Issue #32850 asks that the delegate_task target.options example either work for every provider or state that option names differ by provider. The whole-PR diff of packages/contracts/src/orchestratorMc…
Out of Scope Changes check Passed Two files changed. (1) orchestratorMcp.ts: the description change is the direct implementation of #32850. (2) apps/server/src/provider/agentContextBudget.json: mcpToolListJsonBytes is 59170 at the rev…
Description check Passed The description explains the problem (delegate_task's target.options example uses the Claude-only option id effort, while Codex models use reasoningEffort, causing an 'Unknown option effort' rejection…
Full details: Title check

Explanation

The title names the change: the delegate_task options example in the contracts package says option IDs differ by provider. It is a conventional commit, short, and matches the diff, which rewords the target.options description and raises the budget by 122 bytes. It does not name the mcpToolListJsonBytes update, which is expected for a title.

Full details: Linked Issues check

Explanation

Issue #32850 asks that the delegate_task target.options example either work for every provider or state that option names differ by provider. The whole-PR diff of packages/contracts/src/orchestratorMcp.ts changes the target.options description from "Options from orchestrator_capabilities, such as {effort:'max'}." to "Ids vary by provider; see orchestrator_capabilities." The Claude-only example is removed and the text states the provider-specific behavior, which matches the second expected outcome. The override and clearing text is kept. Discrepancy: the PR description says the final text shows both a Claude example and a Codex example. The reviewed head does not contain either example. This does not change the result for #32850, because the issue accepts the provider-difference wording. The PR description should be corrected. No coding requirement from #32850 remains unmet. Unrelated objectives in the PR description (alias validation) are explicitly excluded by the PR and by the issue's alternative.

Full details: Out of Scope Changes check

Explanation

Two files changed. (1) orchestratorMcp.ts: the description change is the direct implementation of #32850. (2) apps/server/src/provider/agentContextBudget.json: mcpToolListJsonBytes is 59170 at the reviewed head. This value tracks the tool list text, so the change supports the description change and is not an unrelated change. Evidence gap: the merge-base blob for agentContextBudget.json could not be read, so the base value cannot be confirmed. The PR description says the value was raised by 122 bytes, and the raw summary says it decreased from 59192 to 59170. The direction of the change is therefore unverified. This does not affect scope, because the file is a supporting budget value for the changed tool text. No validation behavior changed.

Full details: Description check

Explanation

The description explains the problem (delegate_task's target.options example uses the Claude-only option id effort, while Codex models use reasoningEffort, causing an 'Unknown option effort' rejection), the change (option ids now vary by provider and point to orchestrator_capabilities, with the Claude-only example removed), the scope (links the bug issue #32850 and describes a documentation fix, not a feature), and verification (focused test runs, a budget test with the new byte count, live reproduction on base and head, and CI results). It also states what was not checked, including the eval run and post-compaction model behaviour. It has no separate template-style comment block, but every required section is substantively filled in.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 997103b and 493fff1.

Files selected for processing: 2

  • apps/server/src/provider/agentContextBudget.json
  • packages/contracts/src/orchestratorMcp.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 997103b · PR result: 493fff1 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge
juliusmarminge merged commit a35b3ca into main Nov 22, 2026
38 checks passed
@juliusmarminge
juliusmarminge deleted the factory/issue-32850-a34792 branch November 22, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: delegate_task's options example names effort, which Codex models reject

1 participant