Tokens
1.24billiontokens
that's the Voyager 1 record, transmitted 380 times
across claude · codex · pi · opencode
Local-first recall for AI coding agents
Every AI coding session leaves a transcript behind, and every one of them is effectively write-only. sessions builds one full-text index over Claude Code, Codex, Pi, and OpenCode — then hands it to your agents over MCP, so the next one starts out knowing what the last one already decided.
$brew install nicknisi/formulae/sessions$sessions setupFour tools, four layouts, one timeline. This is the list sessions pipes into fzf when you run it with no arguments.
MCP
The point is not that you can search your history. It is that the agent does it unprompted — before re-deriving a decision, when a why-question is not answered by the code, when you say “didn’t we already fix this”.
search_sessionsRanked search across every session, message-granular. Returns the matching messages, not just the sessions — and a ready-to-run resume command. Top-k, so it is fast and not exhaustive.
grep_sessionsEvery message matching a literal string or regex, with a true total. This is the one for "how many times did I say that" — ranked search would quietly miss some.
get_session_digestOne session's whole arc in a single bounded call, around 2k tokens: every real turn you took, paired with the reply that closed it. Long sessions elide the middle, never the ends.
get_session_messagesThe exact exchange a search matched — pass the hit index straight through as the offset. Ask for tool calls too and you see what the agent actually did, which the prose usually leaves out.
get_context_primerWhere you left off here: recent sessions in detail, older ones as headlines, the branch you were on, and the last thing each one said.
get_memoryThe standing instructions you have already given — build conventions, tooling constraints, rules you should not have to restate. Scoped to this repo, its project group, and your cross-repo workflow rules.
get_activity_digestA date range grouped by day and project. This is what a weekly summary or a standup is built from.
get_session_metricsTool and project breakdown, daily activity, and the hours you are actually working.
A skill is the workflow, not the tool: /recall searches by topic, digests the best candidates, and expands only the exchanges that matched. Say any of the phrases below and it fires.
/contextPrior decisions, dead ends, and the thread you left open.
“what was I doing here”“catch me up on this repo”“context primer”“what's the open thread”
/recallThe reasoning behind one past decision, without paging a transcript.
“what did I do on [project]”“recall [topic]”“history of [project]”“when did I last work on [thing]”
/standupYesterday and today as terse bullets you can paste into Slack.
“standup”“what did I do yesterday”“daily summary”“what have I been working on”
/weekly-summaryA structured week, then a nudge toward any new memory worth keeping.
“weekly summary”“what did I do this week”“summarize my week”“weekly recap”
/session-metricsWhich tool you actually use, and the hours you actually work.
“how much have I been coding”“session stats”“show me metrics”“tool usage”
/memoryA mined batch clustered and triaged — approve, reject, or snooze each one.
“triage memory”“review memory”“mine memory”“/memory”
Search answers “what happened”. Memory answers “what am I not supposed to have to say again” — build conventions, tooling constraints, the rules you have already stated. Candidates are mined from your own transcripts; nothing becomes memory until you say so.
mineDurable facts pulled out of past sessions as candidates.
triageApprove, reject, or snooze each one. Paraphrases merge into a single fact.
scopeBound to this repo, a project group, or every repo you work in.
Report
sessions report reads the same four transcript sources and writes a self-contained HTML dashboard — cost, tokens, cache savings, and breakdowns by tool, provider, model, project, and subagent. Roughly half of a heavy Task user’s tokens land in subagents; this is the view that says which ones.
In the HTML, each stat, heading, and column says on hover what is counted, what is excluded, and what the cost is an estimate of.
Spend per active day, a straight-line projection to the end of the period, and the equally long window immediately before it.
Parsed transcripts are cached against mtime and size, so a second run re-reads only what changed.
Wrapped
sessions wrapped turns the same index into a scroll-through story: tokens at human scale, the receipt, streaks, a rhythm heatmap, your most significant session — and a set of stats mined from what you and your agents actually said to each other.
Tokens
that's the Voyager 1 record, transmitted 380 times
across claude · codex · pi · opencode
The receipt
about 68 oat-milk lattes
estimated from LiteLLM pricing · not a bill
Most said
47 times · your record was 6 in one session
mined from what you actually said to each other
Your type
nocturnal · high-interrupt · one-repo-at-a-time
built from three behavioural axes, evidence on the card
Every candidate stat is scored for how notable it is in your data, and only the top ones render. A daylight coder never sees a 3 AM slide.
A coding personality built from three behavioural axes, with the evidence printed on the card — then a shareable image at 1200×630 or 1080×1920.
Hands your stats to an agent CLI you already have and asks it to improvise. Only stats are sent, never transcripts, and it fails open.
How it works
The index is SQLite with FTS5, built on first use and updated incrementally by modification time. Hits are message-granular, so a match localizes to the exact message rather than the session that contained it.
~/.claude/projects/~/.codex/sessions/~/.pi/agent/sessions/~/.local/share/opencode/~/.cache/sessions/index.dbConstraints
These are load-bearing. Recall over your own transcripts is only worth having if the boundaries are boring and checkable.
Every transcript searched is already on your disk, the index is a local SQLite file, and the report and wrapped are HTML written to your machine and opened from it. There is no account and no server. The one seam that talks to anything is --roast, which hands your computed stats — counts and project names, never transcript text — to an agent CLI you already have installed.
All eight are annotated read-only and none of them writes. Memory is the only thing that persists a decision, and it changes only when you triage a candidate yourself. A store nobody curates is just a log.
Cost is estimated from LiteLLM pricing, cached daily with an offline snapshot. A model with no published price is billed at its family’s newest rate and flagged; one in no known family counts as $0, loudly. Roast slides are stamped “improvised by <tool>” so a generated line can never read as a counted one.
A session-start hook can drop a small primer into every new Claude Code session — three recent sessions for the current repo. It is opt-in, because it costs tokens every single time, and this is your budget rather than a default worth taking on your behalf.
Install
The Homebrew build is a standalone binary with no runtime. sessions setup detects the agent CLIs you have, writes the MCP config for each, and registers the skills. Run it again after an upgrade.
$brew install nicknisi/formulae/sessions$sessions setup