Environment Required and optional environment variables for OMX — API keys, kill switches, and state overrides.
OMX reads a small set of environment variables at startup. Some are required for core functionality; others are optional overrides and kill switches. Export them in your shell profile so they are available to every OMX session.
Variable Description OPENAI_API_KEYOpenAI API key. Required for all Codex CLI sessions. Without it, the CLI will not start.
Variable Default Description OMX_OPENCLAWunset Set to 1 to activate the OpenClaw dispatch pipeline. Without this, no hook events are dispatched to gateways. OMX_OPENCLAW_COMMANDunset Set to 1 to allow command-type gateways (e.g. clawdbot agent launchers). Requires OMX_OPENCLAW=1. OMX_OPENCLAW_COMMAND_TIMEOUT_MS5000Timeout in milliseconds for command-gateway invocations. Set to 120000 for clawdbot agent workflows. HOOKS_TOKENunset Bearer token used by OpenClaw HTTP gateways for authentication.
Variable Description OMX_SKIP_HOOKSComma-separated list of hook names to suppress, or * to disable all hooks. Useful for debugging or CI runs where you want raw Codex behavior. DISABLE_OMXSet to any non-empty value to disable the entire OMX extension layer. Codex runs as if OMX is not installed.
Variable Default Description OMX_STATE_DIR.omx/state/Override the directory where OMX writes session and team state. Useful in CI or multi-worktree setups.
# Required
export OPENAI_API_KEY = "sk-..."
# OpenClaw (optional — enable if you use hook notifications)
export OMX_OPENCLAW = 1
export OMX_OPENCLAW_COMMAND = 1
export OMX_OPENCLAW_COMMAND_TIMEOUT_MS = 120000
export HOOKS_TOKEN = "your-token-here"
Configuration — config files and CLI flags that complement env vars