fix(server): keep Codex task creation with the other task tools #48080
main fromrefs/pull/48080/head·opened View on GitHubProblem#
On T3 Code 0.1.10, a Codex parent asked to read an existing thread issued 16 separate delegate_task calls. Fifteen carried a stop instruction as the task text. Each created a child. The initial tool list exposed the creator directly, while the reader and cancellation tool required discovery. The parent selected the wrong tool repeatedly. The trace does not establish how often this happens.
Change#
Register delegate_task on the same general MCP server as task_cancel and t3_thread_read. Keep t3_thread_wait direct. The replay test checks the configuration T3 sends to Codex.
There is a cost to this approach. An explicit wait-mode delegation in Code Mode can yield before returning its handle, requiring another model request. #30019 moved this tool to direct exposure to address that cost. I have not benchmarked long waits with this patch.
Scope#
Refs #48075. The change is confined to the Codex adapter and its existing session replay test.
Verification#
- On upstream base
f3de72d8f, the replay assertion failed with the extra creator in the direct tool list. With the patch, the adapter and orchestrator service suites passed (374 tests), as didvp run check:changed f3de72d8f. - Applied the corresponding change to release 0.1.10 and restarted the service on macOS arm64 with Codex CLI 0.170.0, GPT-6.2 Astra at xhigh and a custom Responses relay. The resumed session dropped the direct creator. The general catalog exposed both create and cancel. Reading the original source thread returned a message with zero child tasks.
- The live check exercised one read in a resumed session. The same-prompt delegation rate and relay-specific effects remain unmeasured.
Prepared with GPT-6.2 Astra (xhigh) in the Codex harness.
- 1
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
No actionable comments were generated in the recent review.
Walkthrough
-
The Codex adapter no longer registers
delegate_taskas a direct-only T3 tool.t3_thread_waitremains direct-only, and the configuration test expectations reflect this change.Changes: T3 tool registration
Layer / File(s) Summary Direct tool configuration
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts,apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsThe direct-only tool list retains t3_thread_waitand removesdelegate_task. Comments and test expectations reflect the updated registration.Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Suggested reviewers:
juliusmarminge,saphid,acqxi
Merge Risk:
Minimal · up toa83f2-
This change keeps the task-creation tool discoverable alongside the other task tools in Codex sessions, so a parent session is less likely to create child tasks by mistake when it only meant to read a thread. Explicit wait-mode delegation may take an extra model request. No merge-blocking risk was found.
Pre-merge checks:
4-
Check name Status Explanation Title check The title "fix(server): keep Codex task creation with the other task tools" matches the main change. The diff moves delegate_task out of the direct-only list (CODEX_DIRECT_ONLY_T3_TOOLS) so it is disc… Description check The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section explains the observed misbehavior, with reproduction context. The Change section explains t… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
-
Explanation
The title "fix(server): keep Codex task creation with the other task tools" matches the main change. The diff moves delegate_task out of the direct-only list (CODEX_DIRECT_ONLY_T3_TOOLS) so it is discoverable alongside task_cancel and t3_thread_read, and updates the replay test to match. The title is specific and uses a conventional commit format.
Full details: Description check
-
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section explains the observed misbehavior, with reproduction context. The Change section explains the approach and its tradeoff. The Scope section links
#48075and confines the change to the Codex adapter. The Verification section reports the failing-then-passing replay assertion, the test counts, and a live check with its limits. The template's optional agent-attribution line is present. The description is complete and accurate. It does not include a separate conventional commit title, but the PR title covers that.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 2b348c0
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
16d3b589-0401-4368-a66e-eee3e30d14e1
Commits-
Reviewing files that changed from the base of the PR and between 2b348c0a18ce59f6992e9ef16c17d7fb06838927 and a83f23dc10d200336c1e8e165590ba256e4aceb1.
Files selected for processing: 2-
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
-
Nyiuu(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — Task creation moves from an always-advertised direct tool to general tool discovery, while long thread waits remain direct. Human review is required to confirm this change to Codex's default tool presentation.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).