Configuration
OMX configuration files, CLI flags, and hook registration — a complete reference for `.codex/config.toml`, `.codex/hooks.json`, and common launch flags.
OMX reads configuration from files in ~/.codex/ (user-level) and .codex/ (project-level). Project-level files take precedence over user-level files for overlapping keys. Configuration controls model selection, hook registrations, custom prompts, and feature flags.
.codex/config.toml
The primary configuration file. Key fields:
| Field | Type | Description |
|---|---|---|
model | string | Default model for Codex sessions (e.g. "gpt-4.1", "o3"). |
codex_hooks | bool | Enable the OMX hooks extension pipeline. Set true to activate skills, team, and OpenClaw. |
custom-prompts | string | Path to a directory containing custom prompt files that override or extend OMX defaults. |
approval_policy | string | Tool-call approval policy: "suggest", "auto-edit", or "full-auto". |
Example:
model = "gpt-4.1"
codex_hooks = true
custom-prompts = "~/.codex/prompts"
approval_policy = "auto-edit".codex/hooks.json
Registers hook handlers that OMX calls at specific lifecycle points. Each entry maps a hook name to a handler command or MCP tool. See the hooks extension docs for the full hook catalog.
Example registering a post-session-end shell handler:
{
"hooks": {
"session-end": {
"command": "~/.codex/scripts/on-session-end.sh {{sessionId}}"
}
}
}Common CLI flags
| Flag | Description |
|---|---|
--madmax | Maximum parallelism mode — spawns the full team pipeline automatically. |
--high | High-effort mode — uses the highest-tier model available. |
--skip-git-repo-check | Suppresses the error when launching outside a git repository. |
--spark | Routes team workers through the spark worker tier for lighter tasks. |
--madmax-spark | Combines --madmax with spark worker routing. |
Related
- Environment — environment variables that complement config files
- .omx Directory — per-project state directory layout
Was this page helpful?