Codex Project Config Disabled in a Worktree
Prepared and checked using AI. Sources are linked in the article.
If Codex reports project config files disabled in a Git worktree, it is skipping .codex/config.toml because project configuration requires project trust. For a valid linked worktree, Codex can resolve the trust path to the main repository checkout. Add the exact project path named in the warning to your user-level configuration with trust_level = "trusted"; that path can differ from the worktree containing the ignored file.
Identify the worktree and the repository trust path
For example, suppose your main checkout is /home/dev/src/shop and your linked worktree is /home/dev/worktrees/shop-fix.
Run these commands from the affected worktree:
cd /home/dev/worktrees/shop-fix
git rev-parse --show-toplevel
git rev-parse --path-format=absolute --git-common-dir
git worktree list --porcelain
Here, --show-toplevel identifies the current working-tree root, while --path-format=absolute --git-common-dir prints the absolute shared Git directory. In this layout, those paths would be /home/dev/worktrees/shop-fix and /home/dev/src/shop/.git respectively.
The git worktree list output lists the main worktree first, followed by linked worktrees. Use it to distinguish the original checkout from the directory where the agent is working. For more checks before changing configuration, see verify an agent’s worktree and branch.
Read the Codex warning carefully: the folder containing the disabled config and the project path it asks you to trust serve different purposes. Use the requested trust path exactly, including its spelling.
Add trust to your user configuration
Review the repository’s configuration before trusting it. Then open your user-level ~/.codex/config.toml and add this entry if the warning names the main checkout above:
[projects."/home/dev/src/shop"]
trust_level = "trusted"
The projects.<path>.trust_level setting accepts "trusted" or "untrusted". If that table already exists, update its existing setting instead of adding a duplicate table.
Keep the worktree’s actual project settings in /home/dev/worktrees/shop-fix/.codex/config.toml. The trust entry belongs in user configuration: Codex determines trust before loading project configuration layers, so putting the entry inside the disabled project file cannot enable that file.
If you set CODEX_HOME, it changes the root directory used for Codex configuration and state. Update config.toml under that directory, or the user configuration file explicitly named in the warning. This matters when a launcher and your terminal use different environments.
Start a fresh Codex session in the same worktree and check whether the disabled-config warning remains.
If configuration is still ignored
Check for an explicit untrusted worktree entry
In the current loader, an existing trust decision for the configuration directory or project root takes precedence over the main repository’s decision. A worktree entry marked "untrusted" can therefore prevent inheritance from a trusted main checkout.
Inspect the matching entries in user configuration and update the specific decision only if you intend to trust that checkout. If the warning identifies an organization-managed trust setting, ask the administrator to change it.
Check configuration precedence and supported keys
Once trust is resolved, CLI flags and --config overrides still take precedence over project settings. Among project configuration files, the file closest to the current working directory wins.
Some keys remain unsupported in project-local configuration even after trust is granted. These include model_provider, model_providers, notify, and otel; put those settings in user-level configuration. Distinguish a disabled-file warning from a warning about unsupported individual keys.
Check a moved or damaged worktree
Current repository trust resolution validates the linked worktree’s registration and Git metadata before inheriting the main repository’s trust. If you moved directories manually, inspect the paths before adding more trust entries. Git provides git worktree repair to reconnect moved worktrees; follow the appropriate steps in repairing a moved agent worktree.
Where Parallel Code fits
Parallel Code is our free, open-source desktop app for macOS and Linux that runs several AI coding agents in parallel, each in its own Git worktree. It launches the agent CLIs you already use, so this Codex trust configuration remains relevant when running concurrent Codex sessions.