Codex config file locations
Commands use a POSIX shell (macOS, Linux, or WSL). Install the named editor or CLI first. Before using an environment-variable path, check that the variable is set to a non-empty, intended path. When using vi or Notepad, ensure the parent directory exists and is writable. A missing file is created when you save it; Notepad may ask to create it.
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. Run commands from 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 "./.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