RECALL FOR CLAUDE CODE / SEARCH, CONNECT, TRACE
In long development sessions, the conversations that matter most are exactly the ones
compaction pushes out of the window. But Claude Code keeps the full transcript on disk (the last 30 days by default; configurable).
What was missing was never the record; it was a way to remember. blue-strawberry
is that way: a single-file Python CLI, stdlib only, that gives you your past
sessions back through three verbs.
The tool and this page were both written by AI, then checked by AI. 71 tests, CI green on both ubuntu and windows.
Pull up one remark from weeks ago with a keyword. Full-text search across 170MB of real data runs in 0.1 seconds.
Trace a design decision back to the actual words of the conversation where it was made, before hindsight rewrites it.
Distill the conclusions that matter into one-line index entries that load every session. Forgetfulness, cancelled by design.
Claude Code persists every conversation to
~/.claude/projects/<project>/<session-id>.jsonl. Even after context
compaction drops old turns from the visible window, the transcript stays on disk. One
caveat: by default, sessions older than 30 days are cleaned up at startup. Raise
cleanupPeriodDays in settings.json for a long archive; this tool
is far more useful with one. Reading everything back every time would still be expensive, so blue-strawberry recalls in
three layers.
Check the one line in MEMORY.md (name plus a short description) first. Cheap.
If it matches, open that note's body (frontmatter, lineage).
From a lineage anchor, read the actual transcript text back with --deep.
Index, then note, then verbatim: recalling something never requires reading the whole transcript back from scratch.
Memory can be rewritten; human notes and AI summaries both drift. So important claims
in a memory note are pinned to the moment they were actually said. A 系譜: ("lineage") line is that pin: a verified, time-ordered anchor.
It carries an 8-character session prefix and a timestamp, and a machine check confirms that
timestamp actually exists in the target transcript, within a ±3 minute window. The
guardian (check) also inspects dead links, index drift, and stale anchors, every run.
# The guardian. Try it now with the bundled sample data python recall.py --projects-dir sample/projects check # A clean graph prints this dead=0 orphan=0 missing=0 ghost=0 stale=0 # Walk one lineage chain (--deep quotes the actual words said at the time) python recall.py --projects-dir sample/projects lineage node_review --deep
A session prefix that matches no transcript at all, or
an anchor timestamp that resolves to nothing within ±3 minutes (usually a session that
forked or continued into a new file while the anchor was left pointing at the old one), is
an ERROR that sets check's exit code to 1. WARN-only runs stay at 0.
All it needs is Python 3.9+. No dependencies, no external API calls. A synthetic sample dataset ships with it, so there is something to try even without real data.
# install git clone https://github.com/namakoo-dev/blue-strawberry.git cd blue-strawberry python recall.py --help # try it now, with the bundled sample, no real data needed python recall.py --projects-dir sample/projects search "notification" python recall.py --projects-dir sample/projects show a1b2c3d4
71 tests. pytest -q runs green on
GitHub Actions for both ubuntu and windows. The memory layer (check,
lineage, and the rest) stops with exit code 2 and says so plainly when no
memory/ directory is found; it does not pretend to have data it does not have.
Transcript search, list, and show work without that dependency.
What has been checked and what has not are written down separately.
check reports dead=0 orphan=0 missing=0 ghost=0 stale=0 on it,
demonstrating its own consistency."Draw me a blue strawberry." "Strawberries aren't blue, so I can't." That second line is false, and the way it is false matters. The verification was aimed at the wrong proposition, whether blue strawberries exist in nature. The real question was whether the parts already at hand, the shape of a strawberry, the color blue, the ability to draw, could be bundled into something new, and they could. blue-strawberry is the same move: transcripts already stay on disk, Markdown notes can already carry wikilinks, full-text search is old. No new capability was needed, only noticing that the parts could be bundled.
Read the full story in the README The full fable, design notes, honest limits → Read the story on dev.to The Day My Agent Started Having Hunches — measurements, failures and all →