You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(server): Codex calls t3_thread_wait directly instead of from Code Mode - #29026
Codex runs T3's MCP tools inside Code Mode. A blocking t3_thread_wait there is a nested call in a script, so the model keeps working around the wait and burns tokens. The Codex team suggested taking the wait out of Code Mode, like Codex's own wait and multi-agent tools.
Each Codex thread now gets T3's MCP server twice, with the same URL, auth, and timeout:
t3-code: every T3 tool except t3_thread_wait.
t3code: only t3_thread_wait, with omit_tools_from = ["code_mode", "deferred"], so Codex exposes it as a direct tool.
t3code is already a known T3 server alias, so tool display and "waiting" detection work unchanged. Codex versions without omit_tools_from ignore the key and behave as before.
Proof: real Codex 0.166.0 (codex exec, Code Mode on) against a mock Responses API and a mock T3 MCP server. In the captured model request, the old config has no direct T3 tool. The new config has a direct mcp__t3code → t3_thread_wait next to Codex's wait_agent and sleep. The other T3 tools stay where they were. The adapter config test pins the new shape.
Known limits:
If a user's own ~/.codex/config.toml defines a t3code server, or customizes T3's injected t3-code server, the per-thread override conflicts with or replaces it. T3 never creates either, and the same risk already exists for t3-code.
Follow-up: the evals/mcp-tool-use Codex simulator still offers the wait inside Code Mode.
Council review
Rounds: 2
Delegate
Round 1
Round 2
Claude Opus 5.5
8.5/10
9/10
Muse Wonder Full
9/10
9/10
Codex GPT-6.1 Sol
9/10
10/10
Made with Claude Opus 5.5 in Claude Code, running in T3 Code.
Codex Code Mode runs MCP tools as nested calls inside a script. A blocking
t3_thread_wait there leaves the model working around the wait and burning
tokens. Register T3's MCP server twice: `t3-code` without the wait, and
`t3code` with only the wait and `omit_tools_from = ["code_mode", "deferred"]`,
so Codex exposes it as a direct tool like its own wait tools.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Macroscope's review found this PR requires human approval — Codex thread waits now run as direct blocking tool calls rather than nested Code Mode calls, automatically changing behavior for MCP-enabled threads. Human review is needed to confirm this default coordination behavior is intended.
You can add or adjust custom eligibility rules. Learn more.
Codex now receives T3 MCP settings through thread configuration. The settings register general tools as t3-code and t3_thread_wait as t3code. Tool presentation tests and documentation cover the aliases and configuration.
Changes: Codex T3 MCP registration
Layer / File(s)
Summary
Configure and verify T3 MCP registrations apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts, docs/orchestration-v2/orchestrator-mcp-server.md, packages/shared/src/t3McpToolPresentation.test.ts
Codex thread configuration uses the session endpoint, a 65-minute timeout, and an authorization header. It registers general tools under t3-code and t3_thread_wait under t3code. The documentation and tests cover the configuration and alias recognition.
sequenceDiagram
participant Codex
participant CodexAdapterV2
participant T3MCPServer
Codex->>CodexAdapterV2: Start, resume, or fork thread with MCP configuration
CodexAdapterV2->>T3MCPServer: Configure t3-code and t3code with session authorization
Codex->>T3MCPServer: Call t3_thread_wait through t3code
Loading
Possibly related issues
pingdotgg/t3code#26120 — The issue describes the mismatch between launcher overrides and per-thread configuration that this change updates.
Suggested reviewers:juliusmarminge, lnieuwenhuis
Merge Risk: Low · up to 78d52
Codex now calls the thread-wait tool directly instead of through Code Mode. A user who has hand-configured an MCP server named t3code could see thread start or resume fail, and this is already documented as a known limit. The change is otherwise mergeable.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title clearly identifies the primary change: Codex now calls t3_thread_wait directly instead of through Code Mode.
Description check
The description clearly explains the problem, implementation, verification evidence, known limits, and follow-up scope. It does not use the template headings or provide an explicit linked issue or mai…
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: Description check
Explanation
The description clearly explains the problem, implementation, verification evidence, known limits, and follow-up scope. It does not use the template headings or provide an explicit linked issue or maintainer approval, but the content is mostly complete.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Preserve configured tool restrictions.
A user’s t3-code.disabled_tools list is replaced by this list. Previously disabled tools, such as t3_thread_send, become available to the agent. The new t3code registration can also expose t3_thread_wait when the user’s t3-code.enabled_tools excludes it. Preserve the effective allow and deny lists across both registrations. (raw.githubusercontent.com)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex runs T3's MCP tools inside Code Mode. A blocking
t3_thread_waitthere is a nested call in a script, so the model keeps working around the wait and burns tokens. The Codex team suggested taking the wait out of Code Mode, like Codex's own wait and multi-agent tools.Each Codex thread now gets T3's MCP server twice, with the same URL, auth, and timeout:
t3-code: every T3 tool exceptt3_thread_wait.t3code: onlyt3_thread_wait, withomit_tools_from = ["code_mode", "deferred"], so Codex exposes it as a direct tool.t3codeis already a known T3 server alias, so tool display and "waiting" detection work unchanged. Codex versions withoutomit_tools_fromignore the key and behave as before.Proof: real Codex 0.166.0 (
codex exec, Code Mode on) against a mock Responses API and a mock T3 MCP server. In the captured model request, the old config has no direct T3 tool. The new config has a directmcp__t3code→t3_thread_waitnext to Codex'swait_agentandsleep. The other T3 tools stay where they were. The adapter config test pins the new shape.Known limits:
~/.codex/config.tomldefines at3codeserver, or customizes T3's injectedt3-codeserver, the per-thread override conflicts with or replaces it. T3 never creates either, and the same risk already exists fort3-code.evals/mcp-tool-useCodex simulator still offers the wait inside Code Mode.Council review
Rounds: 2
Made with Claude Opus 5.5 in Claude Code, running in T3 Code.
🤖 Generated with Claude Code