Repository navigation
Open
Description
Follow-ups from the two lens reviews of MCP profile part 5 (Codex servers), seam PR #801:
- Lens A (security): fork seams: announce the Codex MCP profile lines (MCP profiles part 5, step 1) #801 (comment)
- Lens B (correctness): fork seams: announce the Codex MCP profile lines (MCP profiles part 5, step 1) #801 (comment)
The fix round on branch fork/mcp-profile-codex closed both blocking items and the majors (see the "Fix round (code branch)" comment on #801). These were left. None of them gives a thread more servers than its profile.
- MCP4/MCP5 turn-check split (lens A 5, lens B 6). MCP4 (
fork/mcp-profile-t3-tool-groups) fixes each non-Claude thread's T3 tool set inmcpProfileTurnCheck.checkTurnProfile. MCP5 addscodextoMCP_PROFILE_DRIVERS, which takes Codex out of that path. Whichever of the two merges second must split the check: fix the T3 tool set for every driver, and refuse outside servers only for drivers not inMCP_PROFILE_DRIVERS. Safe today, because Codex refuses anyt3Toolsother than"all". Expect a text conflict in theMCP_PROFILE_DRIVERScomment. - MCP-Apps calls are not checked (lens A 7).
mcpServer/tool/call,mcpServer/resource/readandmcpServerStatus/listsent by the UI throughwithLoadedThreaddo not pass the turn check. Low impact. - A user's own server named
t3-codeort3-code-directis never switched off (lens A 8). - The store refusal also hits
allthreads (lens A 9, lens B 5). A projection lag would break every Codex thread. The docs now say so. A code change could resolve a thread missing from the store asallwhen no profile setting exists at all. - The
narrowedlatch covers the whole app-server (lens B 3). Codex sub-agents T3 has seen spawned are now counted as their parent's thread, so their model lookup loads under the parent's profile. A sub-agent from before an app-server restart is still refused (cosmetic: its model is not shown). - Gate MCP tool calls per call. Codex asks the client before an MCP tool call (
mcpServer/elicitation/requestwithcodex_approval_kind: "mcp_tool_call"). Denying calls to servers outside the profile there would also cover the remaining edges below, as Claude's per-call check does. - Edges of the turn watch. A turn already running when the profile is narrowed keeps its servers until it ends (documented). A Codex-started turn that ends before its check returns is not stopped; its goal is still paused, without a message. A sub-agent's first turn can start before T3 sees the spawn item; it runs with the set its parent's checked turn had.
- Plugin servers. A server a Codex plugin adds is not switched off; every turn is refused while it is on (fail closed). It could be switched off with
plugins."<id>".mcp_servers.<name>.enabled = false(the id is inmcpServerStatus/list'spluginId), but only after a first load.
Metadata
Metadata
Assignees
Labels
No labels
Activity
scuttletoby commentedon Nov 21, 2026
Orchestrator diff check of the fix round (branch fork/mcp-profile-codex 3c0db1b): OK to go ahead. Two small follow-ups for this issue:
watchTurnchecks only Codex threads already inknown. A turn on a thread T3 has not seen yet (e.g. a Codex sub-agent whosereceiverThreadIdsarrive only onitem/completed, after its first turn started) is not checked, even while a narrowed profile is in use. Sub-agents copy the parent's loaded config, so this matters only when the profile was narrowed after the parent loaded. Consider: whilenarrowed, stop a turn on an unknown thread unless it is adopted within a short wait.turn/started(forked), so a stopped turn can run briefly (a model step, possibly a tool call) before the interrupt lands. Say so in docs/fork, or hold the first tool call of a watched turn until its check finishes.Merge origin/main into fork/mcp-profile-t3-tool-groups; split the tur…
scuttletoby commentedon Nov 22, 2026
Orchestrator decision on item 8 (switch off a plugin's MCP server): keep today's behaviour. A turn that would reach a plugin server outside the profile is refused, which is safe. Switching the server off would need a Codex config key Codex does not validate, and a wrong plugin id could make Codex refuse the whole thread. Revisit when Codex validates that key. Items 2-7 are in #961; this issue closes when #961 merges and item 8 is tracked here as 'won't do for now'.
🤖 Generated with Claude Code
MCP profiles: follow-ups for Codex and the T3 tool rule (#812, #814, #…