Codex CLI 0.169: codex exec does not use an untrusted directory’s configuration or MCP servers
In Codex CLI 0.169.0, codex exec does not enable a project’s own configuration or MCP servers in an untrusted directory, even when the run has write access. Users can save trust with the new --trust flag.
OpenAI released version 0.169.0 of Codex CLI on GitHub on 13 November. Codex CLI is OpenAI’s coding agent for the terminal. The main change concerns the codex exec command, which lets Codex run without a user, for example in scripts and CI pipelines.
Write access does not mean trust
OpenAI’s release notes say that codex exec keeps a project’s own configuration and MCP servers disabled in directories not marked as trusted. This also applies when a run starts with --sandbox workspace-write, a sandbox mode in which the agent may write to the working directory. MCP servers are programs that give the agent extra tools. OpenAI classes the change as a bug fix.
Users can save trust with the new --trust flag, which works with codex exec and codex review. Developers Digest quotes the flag’s help text, which says trust covers the project and future chats, including MCP commands run outside the sandbox. Trust also persists in an --ephemeral run. The flag does not override a project explicitly marked as untrusted.
Developers Digest tested the flag in an empty project without logging in. The flag added the entry trust_level = "trusted" for the project path to ~/.codex/config.toml. Without the flag, the file stayed unchanged. The run stopped at authentication, so the site could not see for itself whether configuration and MCP servers stayed disabled. That information rests on the release notes.
What to check in CI runs
Before upgrading, Developers Digest advises checking CI runs that use the .codex/config.toml settings or MCP servers from a fresh clone of the repository. For your own repositories, the site suggests the --trust flag or adding a project entry to the runner’s config.toml. The site said the flag is best left off when running external code, such as pull requests from forks, because the change protects exactly such runs from MCP commands outside the sandbox.
The Japanese publication MCS (業務改善推進プロジェクト) notes on note.com that an MCP connection that fails in an external repository may result from the directory’s trust status rather than a fault.
Other changes
Version 0.169.0 also adds multiple side-chat tabs to the opt-in terminal workspace and search for past tasks to the agent command centre. Users can now also add and edit custom model providers in the terminal. Version 0.168.0, released the same day, brought a model provider picker and a side-chat pane. Developers Digest said the workspace is still under development in 0.169.0 and off by default.
Codex CLI is open source and available as the npm package @openai/codex. The release notes on OpenAI’s GitHub page list all changes.
Read more: How an agent works · Agent map