Codex Configuration & Customization

Codex can be customized globally, per project, per profile, and per task.

Configuration Layers

Configuration is layered from broad to specific:

  1. Organization or managed policy
  2. User config under CODEX_HOME
  3. Project instructions such as AGENTS.md
  4. Skills and plugin instructions
  5. The current prompt

Common config.toml Fields

Typical settings include model, reasoning effort, sandbox mode, approval policy, AGENTS discovery, web search behavior, feature flags, and MCP servers.

model = "gpt-5.4"
reasoning_effort = "medium"
sandbox_mode = "workspace-write"
approval_policy = "on-request"

Temporary Overrides With -c

The CLI can override config values for a single run:

codex -c model=gpt-5.4-mini -c reasoning_effort=low

Profiles

Profiles let you keep separate presets for different workflows, such as safe local development, read-only planning, or CI automation.

CODEX_HOME

CODEX_HOME changes where Codex reads config, logs, skills, and state. Use it when you need isolated setups.

Feature Flags

Feature flags control experimental or staged capabilities. Keep them documented so teams know which behavior is expected.

Desktop App Settings

The Desktop App exposes many of the same concepts through UI: permissions, model selection, integrations, plugins, and appearance.

Logs And Diagnostics

Use logs when debugging unexpected behavior, missing instructions, or tool failures. CLI logs and app diagnostics can show which config and project instructions were loaded.

Next Steps

Read Permissions next.

评论