Codex config file locations
Find Codex user and trusted-project configuration file locations on macOS, Linux, and Windows.
This page covers user and project configuration. CLI overrides take precedence, followed by trusted project files (closest to the working directory wins), a selected profile, user configuration, and system defaults. Project files cannot override some user-only settings, such as provider configuration. Managed requirements can restrict allowed values.
Project level
Project overridesLoaded only for trusted projects. Replace <project> with the project or subfolder containing this .codex directory.
Config file location
The file or its parent directory may not exist until you create project settings.<project>/.codex/config.tomlCommands
vi "<project>/.codex/config.toml"User level
User defaultsApplies across projects. CODEX_HOME changes the user configuration directory.
Config file location
Default when CODEX_HOME is unset. The first command edits this file.~/.codex/config.tomlUsed instead when CODEX_HOME is set. Use the second command only when this variable points to your configuration location. These are alternative paths for the same user settings.$CODEX_HOME/config.tomlCommands
vi "$HOME/.codex/config.toml"vi "$CODEX_HOME/config.toml"
Official Codex documentation