
Codex 0.169.0: Untrusted Directory Hardening and the New --trust Flag
Codex CLI 0.169.0 disables project configuration and MCP servers in untrusted directories during non-interactive runs, even when workspace write sandbox permissions are granted. Learn how the new --trust flag affects CI pipelines and automated reviews, alongside smaller quality-of-life updates to side chats, plan mode, and custom model provider setup.
Chapter 1
Codex Exec Now Needs Explicit Trust
James Turner
If you run codex exec in CI, there's a change in version 0.169.0 that could quietly break your pipeline. And thanks to Jellypod AI for sponsoring this episode. Codex CLI 0.169.0 shipped on November 13th, and the one item I want to spend real time on is pull request sixty thousand forty one.
James Turner
Here's what changed. In untrusted directories, codex exec now keeps project configuration and MCP servers disabled. And that holds even if you pass the sandbox flag, dash dash sandbox workspace write. Before, you might reasonably assume that granting write access was the big switch. Now it isn't. Write permission and project trust are separate things.
James Turner
Why does that matter? Think about what a repo can carry. It can ship its own project configuration, and it can ship MCP server definitions. If a headless job points at a directory nobody has vetted, loading those would mean running whatever that repo says to run. So the release closes that door by default. If you covered our earlier episode on the standalone exec binary and CLI automation, this is the security counterpart to that. Same non interactive entry point, tighter rules about what it will trust.
James Turner
The practical impact is on anything automated. Think PR reviewers, CI agents, batch evaluation scripts. If those jobs depend on repo specific tools or a project level MCP server, and the directory isn't trusted, those pieces won't load. And the symptom is the annoying kind. Your job still runs, but your tools aren't there. I'd read that as an inference from the release note, so check your own logs, but that's the behavior the note describes.
James Turner
The fix is explicit. The release notes say to use dash dash trust with codex exec or codex review to explicitly save project trust. So a job looks like this: codex exec, dash dash trust, dash dash sandbox workspace write, and then your prompt, say, run lint and fix. Same idea for codex review.
James Turner
A few caveats. First, trust gets saved. The note says explicitly save project trust, so on a shared runner, think about what you're persisting. Second, only pass trust for directories you actually control. If your pipeline checks out pull requests from forks, trusting that checkout is exactly the risk this change was designed to avoid. And third, don't sprinkle the flag everywhere just to make the warnings go away. I know the temptation.
James Turner
Now, a few smaller things in the same release. The opt in terminal workspace supports multiple side chat tabs. You can switch with keyboard or mouse, and saved local side chats reopen after a restart. There's also a Collapse turn details option in the full screen transcript. It folds completed activity under each prompt, while keeping answers visible and tool output searchable.
James Turner
Plan mode got a fix too. The option, Yes, clear context and implement, now hands the full approved plan to the fresh session, and if the handoff fails, your current session stays open. That's one less way to lose a good plan.
James Turner
You can also add or edit custom model providers from the terminal now. With custom gateway onboarding enabled, you can use a device code for supported gateways over SSH, or anywhere without a local browser. And interrupted turns close cleanly, so delayed aborts and file approval cancellations no longer interrupt a later turn. That one's subtle, but it's the kind of bug that makes you distrust a session.
James Turner
So your action item is small. Grep your pipelines for codex exec and codex review, run them once on 0.169.0, and see whether your project tools still load. If they don't, decide deliberately about dash dash trust. That's the changelog for today.