Repository navigation
Bind declared Codex MCP servers after workspace trust - #776
Merged
SaladDay merged 1 commit intoOct 19, 2026
Merged
Conversation
SaladDay
deleted the
bind-declared-codex-mcp-servers-after-workspace-trust
branch
October 19, 2026 09:14
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.
Codex now loads the workspace's native project configuration, as a local run does, and verifies the declared MCP servers against the configuration the native thread actually uses.
config/read, the adapter writes the native trust entry for the workspace project ([projects."<root>"] trust_level = "trusted", keyed like native: symlinks resolved, git root when there is one). Natively,thread/startunderdanger-full-accesstrusts a cwd-bound project anyway, so preparation used to verify an untrusted snapshot while the thread loaded the workspace's.codex/config.toml: a workspace could redefine a declared server after the check. The verified snapshot now equals the onethread/startandthread/resumeuse, and a workspace redefinition of a declared server fails start and cold resume.features.pluginsandfeatures.appskeep their native values. The checks that required exactly the declared servers and forced those features off are removed; they ran against the pre-trust snapshot.default_tools_approval_mode = "approve"is removed: withapproval_policy = neveranddanger-full-access, native already auto-approves MCP tool calls.OAC_RUNTIME_MCP_*) join the provider key inshell_environment_policy.exclude, so native shells do not inherit them.Docs: execution-tools.md with zh mirror, the Codex adapter README.
Tests: unit tests for the trust entry, binding verification and shell exclusion, and a gated native test against the pinned Codex 0.153.4 binary: workspace project config loads on start and cold resume, an extra workspace server is admitted, plugins and apps stay native, and a workspace redefinition of the declared server's URL fails start and resume. Reverting the trust write makes that test fail.
The independent review found no defects introduced by this change. It noted one existing exposure that this change does not alter: workspace configuration can reference the provider key's environment variable. That stays within the accepted workspace-trust risk in model-execution.md#session-override.
Need help on this PR? Tag
@codesmith-botwith what you need.