Support recursive trusted project roots
What variant of Codex are you using?
CLI
What feature would you like to see?
Codex currently appears to require exact per-repo trust entries like:
[projects."/Users/me/repos/some-repo"]
trust_level = "trusted"
For users who keep many trusted repositories under a known parent directory, it would be useful to support an explicit trusted umbrella/root, for example:
[projects."/Users/me/repos"]
trust_level = "trusted"
recursive = true
or an equivalent dedicated setting such as:
trusted_roots = ["/Users/me/repos"]
This would let repositories under /Users/me/repos/* inherit trusted status without cluttering config.toml with one entry per repo. Exact child entries should still be able to override the inherited trust, e.g. marking a sensitive subdirectory as untrusted.
Additional information
Related pain points have come up around exact-path trust, wildcard/global trust not working, and config.toml accumulating many auto-added trust entries. This request is narrower than trusting every directory globally: it asks for an explicit recursive trust boundary chosen by the user.
4 Comments
I would also use this. My repos are often grouped under a trusted parent directory with many child repos/worktrees, so exact per-repo trust entries make config.toml grow quickly.
The VS Code-style model of trusting a parent folder recursively feels like the right user expectation here, especially if explicit child entries can still override inherited trust for sensitive paths.
👍 for
recursive = trueon a group. In my example I would use it on thereposubfolder, maybe thecodexfolder.Without it, the redundancy feels sloppy, especially non-alphabetized:
I think it's better to use glob matching (e.
/opt/codex/repo/*) for flexibility.dumb workaround is to use a wrapper script that checks pwd against allowed directories and then sets it as trusted for the session using
-clike this (tho personally, I just live dangerously by trusting whatever directory I run my wrapper from)Pattern-based rules for project trust and command allowlisting have been on many people's wishlist for way too long...
I can see the "but safety" arguments, but they're pretty weak imo; anyone who wants those guarantees can stick to existing systems while the rest of us could opt-in to pattern matchers.