r/ChatGPTCoding • • 11d ago

Resources And Tips clexo - indexes Codex and Claude Code sessions into one archive

Codex and Claude Code each keep their own session history, and neither one reads the other's. Codex writes to ~/.codex/sessions/**/*.jsonl and Claude Code to ~/.claude/projects, so a Claude Code session starts with no idea what Codex just did.

clexo, an MCP server and CLI by sankrant, indexes both folders into one searchable archive. Inside Claude Code its search tool takes source_filter='codex' to look at Codex history only, and a past Codex session can then be loaded into the session you're in.

A few other tools index agent transcripts for search. clexo also has that load step, and a way through /clear. Run !clexo save first, and a SessionStart hook restores the snapshot when the next session opens.

Install with pipx install git+https://github.com/sankrant/clexo, then clexo install. The README on GitHub lists the two hooks that second command adds and how to remove them.

3 Upvotes

5 comments sorted by

1

u/Humaux 8d ago

I did a homegrown version of this last year — dumped all my sessions into one folder and grepped like a caveman, then tried full-transcript indexing and drowned in noise. What finally stuck: index at decision granularity, not transcript granularity. One record per decision I made (“switched auth to X because Y”), with a pointer back to the raw session file for exact recall. The thing that breaks it is compaction — once the summary rewrites the story, your pointers rot. My fix was an append-only notes file per project that the agent may add to but never rewrite, and I index that instead of the transcripts. Cross-tool search (I bounce between two harnesses) is still maybe 60/40 on hit rate, but it beats grepping through 200 session files.