sessionhub
Search everything you've ever done with your coding agents.


Your Claude Code and Codex sessions are already on disk — thousands of JSONL
files you can't search. sessionhub turns them into one archive you can.
- Search across everything — full-text over every session's titles, summaries and conversation text, by project, machine, or changed file.
- Every machine, in sync — Claude Code and Codex on all your machines pull into one archive on a timer; a laptop queries it over ssh.
- Tiny on disk — keeps the trimmed conversation, not the raw logs. ~10 GB of transcripts → a few hundred MB.
- Ask, don't type — installs a skill so your agent searches its own past for you.
- Yours only — no telemetry, no service; the originals never move off your machines.
Install
uv tool install git+https://github.com/esc5221/sessionhub
sessionhub setup
Or have an agent install it for you
Paste this into Claude Code, Codex, or any coding agent:
Install sessionhub and set it up for this machine. Run:
uv tool install git+https://github.com/esc5221/sessionhub then
sessionhub setup --hub -y then sessionhub skill install. Then show me
sessionhub recent so I can see it worked.
setup --hub -y sets this machine up as its own archive without prompting;
skill install adds the skill to every agent on the machine.
Use
sessionhub recent -d 3 # last 3 days
sessionhub search "split brain" # full text, across everything
sessionhub search --file src/auth.py # sessions that touched a file
sessionhub list -p acme-api # one project
sessionhub show 2c24cdad # detail — 8 characters of the id is enough
sessionhub raw 2c24cdad # the conversation; --full for the raw log
Subagent and exec sessions are hidden by default; -a includes them.
Your agents get the skill during setup — Claude Code and Codex read the same
one — so you can invoke it right in the agent instead of the shell:
# Claude Code
/sessionhub find the session where we fixed the pgbouncer timeout
# Codex
$sessionhub find the session where we fixed the pgbouncer timeout
How it works
A raw agent transcript is ~99.7% machinery — tool calls, streaming frames,
token accounting. sessionhub doesn't haul that around. It keeps three layers,
and only the small ones:
MIRROR the original logs, left where the agent wrote them
│ ~/.claude/projects · ~/.codex/sessions — sessionhub never copies them
▼
DIGEST the conversation, trimmed to what was actually said and gzipped
│ remote machines send only this, over ssh — kilobytes, not gigabytes
▼
INDEX one small row per session: title, project, files, full-text search
(also over the conversation text, +~40% on disk — measured)
plus a pointer back to where the full log lives
sessionhub search/recent/list read the INDEX. sessionhub raw prints the
DIGEST — the conversation, and only the conversation:

sessionhub raw --full opens the untrimmed log from the MIRROR — locally, or
over ssh on the machine that has it. The whole archive is one SQLite file —
hundreds of MB for thousands of sessions, not the tens of gigabytes the raw
logs occupy.
Details
Working across more than one machine
Sessions live on whichever machine you were typing on, so pick one to keep
the archive — a desktop that's usually on is ideal. sessionhub setup asks
which role a machine has:
keeps the archive reads its own sessions on a timer, and can pull in
other machines' sessions over ssh
queries the archive stays empty; sends every search to the machine that
has one
On a laptop, choose queries the archive and give it the other machine's ssh
alias. Searches then run there and you get the results — nothing is copied.
sessionhub search "..." # answered by the archive machine
sessionhub --local recent # this machine's own data instead
The archive pulls a remote machine's sessions by asking it, over ssh, for
digests only — never the raw logs, which stay put. Read-only queries are
forwarded the same way; ingest, run, service and uninstall always act
locally, so they can't disturb a remote archive by accident.
sessionhub remote install # writes a short `shm` alias for querying
Storage — why it stays small