Codex
How it connects
Codex 0.130 has stable lifecycle hooks, enabled by default. runmarq writes them to ~/.codex/hooks.json (or .codex/hooks.json in a project); it never edits config.toml. CODEX_HOME is respected.
runmarq integrations setup codexOne manual step: Codex does not run hooks until you trust them. Open Codex, run /hooks and trust the runmarq entries. Until the first event arrives, runmarq shows the integration as waiting rather than connected.
Events used
SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PreCompact and Stop. Every event after session start carries a turn id, which maps one-to-one onto a runmarq run.
Events also name the session's rollout file on your computer. runmarq reads token counts, the context window and the effort level from it, and keeps neither its text nor its location.
Start Codex through runmarq
Codex 0.130 has no session-end, interrupt or tool-failure hooks. When Codex is started through the wrapper, runmarq learns when the process exits and closes any run it left open as cancelled. Failed shell commands are detected from exit codes when Codex reports them.
runmarq run -- codex
runmarq run -- codex exec --json "fix the failing test"With codex exec --json, the wrapper also reads Codex's structured event stream while passing every line through unchanged, and suppresses the hooks for that process so nothing is counted twice.
What is not possible
Codex sessions already running in an IDE, started without hooks, cannot be observed. runmarq does not read terminal output to guess at progress.
Compatibility
| Connection | Codex lifecycle hooks (hooks.json) and the runmarq run wrapper |
| Support | Limited |
| Checked against | Codex CLI 0.130.0 hook payloads; not yet run live |
Capabilities
| Signal | Available |
|---|---|
| Prompt start | Yes |
| Turn completion | Yes |
| Tool start | Yes |
| Tool completion | Yes |
| Plan progress | Yes |
| Approval requests | Yes |
| Errors | No |
| Subagents | No |
| Model metadata | Yes |
| Token counts | Yes |
| Interrupts reported directly | No |
Known limitations
- Requires Codex 0.130 or later, and the runmarq hooks must be trusted once with /hooks inside Codex.
- Codex 0.130 has no tool-failure, interrupt or session-end hooks. Failed shell commands are detected from exit codes when Codex reports them.
- Start Codex with `runmarq run -- codex` to have runs closed when the process exits.
- Already-running Codex IDE sessions that were started without hooks cannot be observed.