Skip to content

cli/tui: add codex trust + warn on untrusted MCP config - #9708

Closed
swordfish444 wants to merge 1 commit into
openai:mainfrom
swordfish444:fix/9676-mcp-project-trust
Closed

swordfish444 wants to merge 1 commit into
openai:mainfrom
swordfish444:fix/9676-mcp-project-trust

Conversation

@swordfish444

Copy link
Copy Markdown
Contributor

Fixes #9676.

Project-local .codex/config.toml is intentionally only loaded for trusted projects. When [mcp_servers] is defined in an untrusted project config, MCP servers can appear to “disappear” after upgrading because the config layer is skipped.

Changes:
• Add codex trust to mark the current directory (or git root) as trusted (writes to CODEX_HOME/config.toml).
• Improve codex mcp list empty-state messaging for the untrusted project-local MCP config case.
• Improve the TUI /mcp empty-state with the same guidance.
• Add CLI regression tests covering the untrusted hint + codex trust flow.
• Update docs/config.md to mention project-local config trust.

Test plan:

just fmt
just fix -p codex-cli
just fix -p codex-tui
cargo test -p codex-cli
cargo test -p codex-tui

Tagging @AyinMostima and @etraut-openai for visibility.

@swordfish444

Copy link
Copy Markdown
Contributor Author

Note: the Bazel (experimental) jobs are failing with UNAUTHENTICATED: missing API key because BUILDBUDDY_API_KEY is empty on fork PRs (secrets aren’t available). This looks unrelated to the changes in this PR.

@etraut-openai

Copy link
Copy Markdown
Contributor

@swordfish444, thanks for the contribution, but we are already working on a fix for this.

@swordfish444

Copy link
Copy Markdown
Contributor Author

Makes sense — thanks for the heads up. I left the root-cause summary + mitigation options on #9676 in case it’s useful, and I’m happy to help test the fix on Windows once it lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP servers defined in config.toml are not detected/visible after update

2 participants