Providers
Back to spooling.aiOpenAI Codex CLI
How Spool ingests Codex CLI sessions.
OpenAI Codex CLI writes one JSONL file per session, similar in shape to Claude Code's.
Where sessions live
~/.codex/sessions/<session-id>.jsonlEach line is a JSON record. We parse user, assistant, and tool messages, plus model usage when the records include it.
What we parse
- Messages with role, content, timestamp.
- Tool calls when the records carry them. Codex's tool format is closer to OpenAI's tool-calling schema than Claude's content-block style; we normalize both.
- Token usage and estimated cost, when present.
Gotchas
- Session boundaries depend on Codex CLI version. Some builds rotate session files mid-conversation; we treat each file as its own session and don't try to merge across files.
- Model rates default to GPT-4 family pricing when the record doesn't tag a specific model. Override in
model_prices.jsonif you're running cheaper variants.