Skip to content

Commit 6f94a2a

Browse files
t3dotggclaude
andcommitted
refactor(server): name Codex's direct-only T3 MCP server t3-code-direct
The split server from #29026 was named `t3code`, which the model sees as `mcp__t3code` next to `mcp__t3_code`. Rename it to `t3-code-direct` so its purpose is clear. Only the Codex adapter config changes; the shared tool resolver also recognizes the new name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 0c4454c commit 6f94a2a

5 files changed

Lines changed: 20 additions & 9 deletions

File tree

‎apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ describe("CodexAdapterV2 post-settle continuation", () => {
15321532
http_headers: { Authorization: "Bearer secret-codex-token" },
15331533
disabled_tools: ["t3_thread_wait"],
15341534
},
1535-
"mcp_servers.t3code": {
1535+
"mcp_servers.t3-code-direct": {
15361536
url: "http://127.0.0.1:43123/mcp",
15371537
tool_timeout_sec: 3_900,
15381538
http_headers: { Authorization: "Bearer secret-codex-token" },

‎apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,8 +1334,9 @@ export const CODEX_THREAD_CONFIG = {
13341334

13351335
// T3 waits can block for an hour; keep Codex's MCP timeout above that.
13361336
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";
13391340
const CODEX_DIRECT_ONLY_T3_TOOL = "t3_thread_wait";
13401341

13411342
function codexThreadRuntimeParams(input: {
@@ -1373,7 +1374,7 @@ function codexThreadRuntimeParams(input: {
13731374
"mcp_servers.t3-code": { ...t3Server, disabled_tools: [CODEX_DIRECT_ONLY_T3_TOOL] },
13741375
// Code Mode runs a blocking wait as a nested call, and the model keeps working
13751376
// 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}`]: {
13771378
...t3Server,
13781379
enabled_tools: [CODEX_DIRECT_ONLY_T3_TOOL],
13791380
omit_tools_from: ["code_mode", "deferred"],

‎docs/orchestration-v2/orchestrator-mcp-server.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ and `thread/fork` config, with the provider-session token in an
6363
`Authorization` header. The same server is registered twice:
6464

6565
- `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"]`.
6767

6868
Code Mode runs a nested call as part of a script, so the model keeps working
6969
while a blocking wait runs. The second entry makes the wait a direct tool call,

‎packages/shared/src/t3McpToolPresentation.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ describe("resolveT3McpToolPresentation", () => {
1717
"mcp__t3code__",
1818
"T3-code.",
1919
"t3code.",
20+
"t3-code-direct.",
21+
"mcp__t3_code_direct__",
2022
"t3_code/",
2123
"t3code:",
2224
"mcp_t3-code_",

‎packages/shared/src/t3McpToolPresentation.ts‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,14 @@ function tool(
8686
return { displayName, labels, icon, summaryAction };
8787
}
8888

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+
]);
9097

9198
const T3_MCP_TOOLS: Readonly<Record<string, T3McpToolDefinition>> = {
9299
link_pull_request: tool(
@@ -386,9 +393,10 @@ function resolveT3McpToolName(value: string): string | null {
386393
: null;
387394
}
388395

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+
);
392400
if (namespaceMatch?.groups) {
393401
return namespaceMatch.groups.tool ?? null;
394402
}

0 commit comments

Comments
 (0)