Config & CLI Reference
Configuration layers
Codex config stacks from outer to inner:
~/.codex/config.toml— user defaults.codex/config.toml— project overrides (after trusting the project)requirements.toml— org-enforced policy (managed devices)- CLI flags — per-session overrides
CLI and IDE extensions share the same configuration model.
Common config.toml settings
Full key list: Configuration Reference.
Common CLI flags
Subcommands overview
Details: CLI Reference.
Model switching
In the TUI:
Pick GPT-5.x, Codex-tuned models, etc. Use stronger reasoning for long tasks; faster models for simple scripts.
Logging and sessions
- TUI log:
codex-tui.log - Session JSONL (if enabled):
session-*.jsonl
Useful to audit AGENTS.md loading and tool call sequences.
Scripting example
CODEX_HOME multi-profile
Separates work vs. personal accounts, or CI bot users.
Next steps
- Sandbox & Security: risk of each preset
- Practical Examples:
exec+ CI patterns