Codex Integration
partio supports OpenAI Codex CLI as a first-class agent alongside Claude Code. When you use Codex in a partio-enabled repository, sessions are captured alongside your commits — the same way they are for Claude Code.Detection
partio detects Codex by checking for a runningcodex process. When the pre-commit hook fires, it:
- Checks if a Codex process is active on the system (
pgrep -f codex) - Locates the latest session file under
~/.codex/sessions/, matching the session’s working directory against the current repository root
Selecting the agent
By default theagent setting is empty, and partio auto-detects whichever supported agent is currently running (Claude Code or Codex). You usually don’t need to configure anything.
To pin partio to Codex explicitly — useful if you run multiple agents — set the agent field or the PARTIO_AGENT environment variable:
.partio/settings.json
What gets captured
For each commit made while Codex is active, partio captures the same checkpoint data as any other agent:| File | Contents |
|---|---|
full.jsonl | The complete JSONL transcript of the Codex session |
context.md | A summary of the session context |
diff.patch | The unified diff for the commit |
prompt.txt | The initial prompt that started the session |
metadata.json | Session metadata (agent, token count, duration) |
Session metadata
Attribution & trailers
Attribution and commit trailers work identically for every agent. After each checkpoint, your commit is amended with:Troubleshooting
Checkpoints not being created
- Run
partio doctorto check installation health - Verify Codex is running when you commit — partio only captures when it detects an active process
- Check log output with
partio --log-level debug status(theAgent:line shows which agent partio resolved) - Verify hooks are installed — look for
# Installed by partioin.git/hooks/post-commit
Session file not found
Codex stores session files under~/.codex/sessions/. If partio can’t find the session:
- Ensure Codex has been used in the current repository at least once
- Check that the session file hasn’t been cleaned up before the commit