The best way to control Claude Code, Codex and more from any computer or phone
refactor(server): name Codex's direct-only T3 MCP server t3-code-direct (#29068)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Nov 1, 2026 at 21:07 UTC
23075af981e40f7c1071871782d489896c3919f6
5 files changed
+20
-9
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts
+1
-1
@@ -1532,7 +1532,7 @@ describe("CodexAdapterV2 post-settle continuation", () => {
1532
http_headers: { Authorization: "Bearer secret-codex-token" },
1533
disabled_tools: ["t3_thread_wait"],
1534
},
1535
- "mcp_servers.t3code": {
1535
+ "mcp_servers.t3-code-direct": {
1536
url: "http://127.0.0.1:43123/mcp",
1537
tool_timeout_sec: 3_900,
1538
http_headers: { Authorization: "Bearer secret-codex-token" },
apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts
+4
-3
@@ -1334,8 +1334,9 @@ export const CODEX_THREAD_CONFIG = {
1334
1335
// T3 waits can block for an hour; keep Codex's MCP timeout above that.
1336
const CODEX_T3_MCP_TOOL_TIMEOUT_SEC = 65 * 60;
1337
-// Calls arrive as `t3code.<tool>`; t3McpToolPresentation.ts must keep resolving that form.
1338
-const CODEX_T3_WAIT_MCP_SERVER = "t3code";
1337
+// Holds T3 tools Codex must call directly, never from Code Mode. Calls arrive as
1338
+// `t3-code-direct.<tool>`; t3McpToolPresentation.ts must keep resolving that form.
1339
+const CODEX_T3_DIRECT_MCP_SERVER = "t3-code-direct";
1340
const CODEX_DIRECT_ONLY_T3_TOOL = "t3_thread_wait";
1341
1342
function codexThreadRuntimeParams(input: {
@@ -1373,7 +1374,7 @@ function codexThreadRuntimeParams(input: {
1374
"mcp_servers.t3-code": { ...t3Server, disabled_tools: [CODEX_DIRECT_ONLY_T3_TOOL] },
1375
// Code Mode runs a blocking wait as a nested call, and the model keeps working
1376
// around it. A second, direct-only registration makes it a plain tool call.
1376
- [`mcp_servers.${CODEX_T3_WAIT_MCP_SERVER}`]: {
1377
+ [`mcp_servers.${CODEX_T3_DIRECT_MCP_SERVER}`]: {
1378
...t3Server,
1379
enabled_tools: [CODEX_DIRECT_ONLY_T3_TOOL],
1380
omit_tools_from: ["code_mode", "deferred"],
docs/orchestration-v2/orchestrator-mcp-server.md
+1
-1
@@ -63,7 +63,7 @@ and `thread/fork` config, with the provider-session token in an
63
`Authorization` header. The same server is registered twice:
64
65
- `t3-code`: every tool except `t3_thread_wait`.
66
-- `t3code`: only `t3_thread_wait`, with `omit_tools_from = ["code_mode", "deferred"]`.
66
+- `t3-code-direct`: only `t3_thread_wait`, with `omit_tools_from = ["code_mode", "deferred"]`.
67
68
Code Mode runs a nested call as part of a script, so the model keeps working
69
while a blocking wait runs. The second entry makes the wait a direct tool call,
packages/shared/src/t3McpToolPresentation.test.ts
+2
@@ -17,6 +17,8 @@ describe("resolveT3McpToolPresentation", () => {
17
"mcp__t3code__",
18
"T3-code.",
19
"t3code.",
20
+ "t3-code-direct.",
21
+ "mcp__t3_code_direct__",
22
"t3_code/",
23
"t3code:",
24
"mcp_t3-code_",
packages/shared/src/t3McpToolPresentation.ts
+12
-4
@@ -86,7 +86,14 @@ function tool(
86
return { displayName, labels, icon, summaryAction };
87
}
88
89
-const T3_MCP_SERVER_ALIASES = new Set(["t3-code", "t3_code", "t3code"]);
89
+// Codex registers "t3-code-direct" for T3 tools kept out of Code Mode.
90
+const T3_MCP_SERVER_ALIASES = new Set([
91
+ "t3-code",
92
+ "t3_code",
93
+ "t3code",
94
+ "t3-code-direct",
95
+ "t3_code_direct",
96
+]);
97
98
const T3_MCP_TOOLS: Readonly<Record<string, T3McpToolDefinition>> = {
99
link_pull_request: tool(
@@ -386,9 +393,10 @@ function resolveT3McpToolName(value: string): string | null {
393
: null;
394
}
395
389
- const namespaceMatch = /^(?<server>t3-code|t3_code|t3code)(?:[.:/]|\s*·\s*)(?<tool>.+)$/i.exec(
390
- label,
391
- );
396
+ const namespaceMatch =
397
+ /^(?<server>t3[-_]code[-_]direct|t3-code|t3_code|t3code)(?:[.:/]|\s*·\s*)(?<tool>.+)$/i.exec(
398
+ label,
399
+ );
400
if (namespaceMatch?.groups) {
401
return namespaceMatch.groups.tool ?? null;
402
}