total-recall in Codex CLI¶
Status¶
- MCP support: yes (stdio, configured via
~/.codex/config.toml) - Hook support: no
- Session storage:
${CODEX_HOME:-~/.codex}/sessions/<rollout>.jsonl - Adapter complexity: ~570 LOC (replay state machine + token-block normalisation)
Install the MCP server¶
- Install total-recall so the
total-recallconsole script is on$PATH:
pip install total-recall
- Drop this into
~/.codex/config.toml:
[mcp_servers.total_recall]
command = "total-recall"
args = ["mcp"]
startup_timeout_sec = 10
- Restart Codex CLI.
- Verify: launch Codex and ask for "the tools you can see" — it should mention
total-recall's tools (or check Codex's own/mcpequivalent if your build has one).
What you get¶
- 26 MCP tools (recall, get_operator_context, check_banned, ...).
- No hooks — Codex CLI does not expose lifecycle hooks.
Session ingest¶
total-recall autodetects Codex sessions under ~/.codex/sessions. Verify:
total-recall sources test codex
Override the root with CODEX_HOME=/some/other/path.
Caveats¶
- TOML keys use underscores, so the section name is
mcp_servers.total_recall(nottotal-recall). Codex's TOML parser rejects hyphens here. - Codex stores per-rollout transcripts; sessions appear as separate files but share state via parent-uuid links — the adapter reconstructs them.
- Token-usage payloads have a different shape than Anthropic's; the adapter preserves the original under
usage["_codex_raw"]so nothing is lost.