Expand description
Codex CLI installer adapter.
§What we touch
~/.codex/config.json—mcpServers.spoolentry~/.codex/hooks.json— hook entries for session_start, post_tool_use, session_end pointing to our hook scripts~/.codex/hooks/spool-*.sh— three hook scripts
§Codex hook format
Codex uses a flat hooks.json with the shape:
{
"hooks": {
"session_start": [{"command": "...", "timeout_ms": 5000}],
"post_tool_use": [{"command": "...", "timeout_ms": 5000}],
"session_end": [{"command": "...", "timeout_ms": 10000}]
}
}Unlike Claude Code’s settings.json (which wraps each entry in a
{matcher, hooks: [...]} envelope), Codex entries are flat objects
with command + timeout_ms.
§Binary resolution
Same strategy as Claude: default to ~/.cargo/bin/spool-mcp, with
--binary-path as an escape hatch.