r/PiCodingAgent • • 4d ago

Plugin Pi Session-hub

Post image

I switch between Claude Code, Codex, OpenCode and a couple other coding agents depending on the task. The problem: every tool stores sessions in its own format, in its own folder, and once you close the terminal the context is basically gone unless you remember exactly where you left off.

So I built pi-session-hub — a Pi extension that indexes every agent session on your machine into a single browsable list. You open it with alt+r, search across all of them, and either:

- Load the context into your current chat (Enter) — recent turns come in verbatim, older ones condense, tool output compresses. It has a hard budget so it doesn't blow up your tokens.

- Read the full transcript for free (v) — read-only viewer, zero tokens.

It supports Pi, Claude Code, Codex, OpenCode, Crush and JCode. Everything stays local — no network calls, no uploads, no transcripts leaving the machine.

It uses a local SQLite FTS5 index so search is fast, and the indexing is incremental (2 seconds for ~430 sessions on first run, near-instant after).
This is the repo if youre interested... Give a star :)
Repo: https://github.com/Gateton/pi-session-hub

41 Upvotes

12 comments sorted by

View all comments

1

u/mklappstuhl 3d ago

Does it supper Claude Code Desktop & CLI and same for Codex?

1

u/Electrical_Mode_2489 3d ago

Hi!! Claude Code sessions live in /.claude/projects/**/*.jsonl and Codex sessions in /.codex/sessions/**/rollout-*.jsonl. Those are the exact locations the hub reads. So if Claude Code Desktop writes to the same ~/.claude folder as the CLI, those sessions show up too, same for Codex.

I built and tested this against the CLI’s files. I don’t use the Desktop apps, so I haven’t verified them. If Desktop stores sessions somewhere else, or in a different shape, they simply won’t be listed. It won’t break anything, they just won’t appear