Repository navigation
Conversation
Some workplaces deploy a Codex admin policy that allows MCP servers only from approved plugins. That policy refuses the MCP servers T3 Code puts in each thread's config, so Codex threads lose every T3 Code tool. t3-codex fixes this without changing how T3 Code talks to Codex. T3 Code's Codex binary path points at it. It runs the real app-server, moves T3 Code's per-thread servers out of thread config, and serves them through a T3 Code plugin whose bridge pipes to it. Each tool call still uses the calling thread's own credential; subagents act as their parent thread. T3 Code also gains an opt-in T3CODE_MCP_SOCKET that serves /mcp, and only /mcp, on an owner-only Unix socket for hosts that forbid loopback MCP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
The same plugin-only policies exist for Claude Code: they refuse the MCP server T3 Code adds through the Agent SDK's setMcpServers, so Claude threads lose T3 Code's tools too. The crate becomes t3-mcp-plugin and builds t3-codex and t3-claude. T3 Code's Claude binary path points at t3-claude, which moves the t3-code server out of mcp_set_servers (also on rotation) and serves it through the plugin. Claude runs one process per thread, so every call uses that thread's credential. Claude names plugin tools differently, so t3-claude maps them back to mcp__t3-code__* for T3 Code's allowed tools, approvals and tool rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The socket now shares the main router through one HttpServer instead of
passing raw requests along with emit("request"). Startup checks use
FileSystem and a typed McpSocketError.
Model: Claude Opus 5.5 (claude-opus-5-5), harness: Claude Code in T3 Code.
Model: Claude Opus 5.5 (claude-opus-5-5), harness: Claude Code in T3 Code.
Model: Claude Opus 5.5 (claude-opus-5-5), harness: Claude Code in T3 Code.
Drops tests of a case T3 Code never produces, trivial parsing checks, and a wall-clock wait. The Codex and Claude rewrites are each tested once, message in to message out. The test-only Stdin constructor goes: pending replies are their own type. The socket module follows the server's Effect style. Model: Claude Opus 5.5 (claude-opus-5-5), harness: Claude Code in T3 Code.
Runs T3 Code's real codexThreadRuntimeParams and claudeMcpQueryOverrides against fixtures the Rust wrappers parse, and checks the plugin's server settings against them. Unrelated thread config changes don't affect it. Model: Claude Opus 5.5 (claude-opus-5-5), harness: Claude Code in T3 Code.
…'s helpers T3_MCP_SOCKET read too much like T3 Code's T3CODE_MCP_SOCKET, so the wrapper's bridge channel is now T3_MCP_BRIDGE. One lock helper and one runtime builder replace the copies in each module, and an error shared by both wrappers no longer names t3-codex. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact
This comment will update automatically after the next completed run. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some workplaces run admin policies that allow MCP servers only from approved plugins (Codex's
requirements.toml, Claude Code's managed settings). Under them, Codex and Claude refuse the MCP server T3 Code gives each thread, so those threads have no T3 Code tools.This adds
native/t3-mcp-plugin: a T3 Code plugin for both CLIs, plus two small wrappers,t3-codexandt3-claude, that an admin sets as the provider's binary path. The wrapper takes T3 Code's server out of the thread's config before the CLI sees it, and the plugin's server sends each tool call to T3 Code with that thread's own credential. Credentials, scopes, approvals and tool names work as they do today. Details, including how the credential is kept from agents, are in the crate's README.The one server change is optional:
T3CODE_MCP_SOCKETalso serves/mcpon an owner-only Unix socket, for machines that block MCP over loopback TCP.apps/server/src/mcp/mcpPlugin.test.tsfails if T3 Code changes how it hands its server to Codex or Claude.Validation:
vp run check:changedandcargo testpass, and clippy is clean for Linux, macOS and Windows. On Linux with each policy in place, real Codex (Luna) and Claude Code (Haiku) turns used T3 Code tools through the plugin, including an approval prompt, a subagent and a credential rotation; without the wrappers, both CLIs had no T3 Code tools. macOS and Windows are type-checked only, and release builds don't package the binaries yet.Implemented with Claude Opus 5.5 in Claude Code, through T3 Code.