Skip Navigation

Scott Spence

omnirecall - Search Your Claude Code, Codex and Pi Sessions in One Place

• 4 min read

Claude Code keeps your sessions on disk, for 30 days by default. Each one is a JSONL file in ~/.claude/projects, one folder per project: every prompt, every response and every tool call.

When I found that out, it gave me an idea. If I want to search my past sessions, make a CLI that syncs those files into SQLite, then tell the LLM to use the CLI to search for context.

One recall CLI per agent

That was ccrecall. I made the first version in December 2025, and its first sync read 7,102 transcript files from my ~/.claude folder: 2,492 sessions and 64,825 messages.

Then it turned out the other agents do the same:

AgentSessions stored inRecall CLI
Claude Code~/.claude/projects/<project>/*.jsonlccrecall
Pi~/.pi/agent/sessions/<project>/*.jsonlpirecall
OpenAI Codex~/.codex/sessions/<year>/<month>/<day>/*.jsonlocrecall

pirecall came in April 2026 when I moved most of my work to Pi, and ocrecall this month. Same idea each time: sync the sessions to SQLite, give the agent a CLI.

Three tools for three agents meant I had to remember which agent I’d used before I could find anything.

omnirecall: all of them in one place

omnirecall groups them together. It reads Claude Code, Pi and Codex session histories into one local SQLite database, including Claude Code’s subagent sessions. Those three are all I use really, but I built it so I can add other coding agents further down the line if I need to.

It’s a centralised SQLite database I can give to any coding agent. I say ā€œuse pnpx omnirecall to find Xā€ and it goes and does it.

There’s no account and nothing hosted. The archive sits on my machine, and imported sessions stay searchable even after the agent deletes its own copies.

Use it from a coding agent

This is how I use it most of the time. I ask in the conversation I’m already in:

1Use pnpx omnirecall to find the session where we changed the
2database queries and fixed slow search. What did we change?

The agent runs the commands, searches the earlier sessions and reads the relevant context without me leaving the conversation. Agents are good with a CLI, and --help on each command tells them what they need.

Run it directly

The commands are the same when I run them myself:

1pnpx omnirecall sync
2pnpx omnirecall search "database migration"
3pnpx omnirecall read '<ref from search>' --context 2

sync picks up new conversations. It never runs automatically, so the archive is as fresh as the last time I synced it.

Search uses SQLite FTS5, so the query syntax is FTS5’s: "exact phrase", sqlite OR database, migrat*. It searches conversation messages by default, and --kind all brings in tool calls and their output too.

--json gives structured results, and recall --compact --json is the one I point agents at. It returns matches with the messages around them in a compact shape that doesn’t flood the context window.

An example from this month

This month I moved my development setup from EndeavourOS to Ubuntu. I planned the install with Codex on 8 September, then wrote the post about it with Pi on the 16th.

One search finds both:

1pnpx omnirecall search "endeavouros" --json

Here’s the shape of what comes back, trimmed down:

1{
2	"results": [
3		{
4			"agent": "codex",
5			"title": "Explain Ubuntu boot options",
6			"project": "/home/scott/repos/docs",
7			"timestamp": "2026-09-08T14:08:55.515Z",
8			"snippet": "…If you see ā€œEndeavourOSā€ and an ā€œEndeavourOS fallbackā€ option when you restart…"
9		},
10		{
11			"agent": "pi",
12			"project": "/home/scott/repos/scottspence.com",
13			"timestamp": "2026-09-16T17:51:44.919Z",
14			"snippet": "…Untracked: `posts/moving-my-development-setup-from-endeavouros-to-ubuntu.md`…"
15		}
16	]
17}

Each result also has a ref, which goes into omnirecall read to pull up the conversation around the match.

Without omnirecall I’d have needed to remember the work was split across two agents, then search each one separately. Now whichever agent I’m in can see both.

The bigger use

Where it really pays off is pulling evidence out of months of work. Not ā€œI worked on Xā€ but actual outcomes: what shipped, what it fixed and when.

I give a session omnirecall for fuzzy searches and mcp-sqlite-tools, one of the two MCP tools I still use, for narrow queries against the same database. It pulls out decisions, dates and numbers I’d long forgotten, and checks them against git history. My memory of what I did in May is not as good as the record of it!

Codex plugin

There’s also a plugin for Codex and the ChatGPT desktop app, which adds a recall skill that uses the same CLI:

1codex plugin marketplace add spences10/omnirecall --ref main
2codex plugin add omnirecall@personal

The installation guide has the desktop app steps.

Wrapping up

One archive, three agents, and room for more. If you use more than one coding agent and keep losing track of where a conversation happened, give it a go:

1pnpx omnirecall sync

It’s on GitHub and npm.

There's a reactions leaderboard you can check out too.

Sign up for the newsletter

Want to keep up to date with what I'm working on?

Join other developers and sign up for the newsletter.

I care about the protection of your data. Read the Privacy Policy for more info.

Copyright Ā© 2017 - 2026 - All rights reserved Scott Spence