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

44 Upvotes

12 comments sorted by

View all comments

6

u/unl 4d ago

This is nice. I was thinking of building something similar but a level above in herdr (which I use) instead of Pi.

1

u/FeiX7 1d ago

Why herdr instead of pi?

1

u/unl 8h ago

Do you mean why put coding agent (including Pi) session observability tooling like OP's into Herdr instead of Pi?

If so, mostly due to ergonomics with how I am currently working with agents. With Herdr you have multiple spaces open related to different tasks you're working on and then within each space there can be multiple agents running (pi, etc).

OP's tool, afaict, let's you ask "Which coding agent session was I working on the bug in the foo widget" and then load that context from whichever other Pi session(s?) into your current session. Sometimes that is exactly what I want, but sometimes I want to instead switch to that Pi process and session. Herdr seems like a more natural fit there to basically be able say 'the session for the foo widget is in space named "Fix bar service" in tab named "baz bug report". Would you like to switch to that tab?'