Persistent local memory for Claude Code.
subrosa archives every Claude Code session in a local SQLite database. Search it with subrosa search.
A plain subrosa search retries semantic search after zero keyword hits when automatic indexing is on and its local model and index are available. Use --raw to skip that retry. Plain search never starts the one-time model download.
Prompt recall is keyword-only. It adds up to 3 lines when the match is strong: up to 2 saved facts left out of MEMORY.md, then past-session snippets.
- Saving uses plain-text parsing. It makes no model call and uses 0 model tokens.
- The project has 11 direct crates and one static binary of about 5 MB. SessionEnd starts a short-lived detached archival worker.
- The binary opens no sockets by default. A system
curl child makes the one-time model download. Optional automatic checkpointing runs a configured Claude child and sends redacted transcript text to Anthropic.
- Nothing you type, save, or search is uploaded unless you explicitly opt in to automatic checkpointing. Secret shapes are masked before storage.
subrosa forget <id> --confirm deletes 1 session from the archive for good. The FAQ lists the copies that stay.
- Recall adds about 200 estimated tokens on a strong match in the benchmark fixture. The estimate divides response bytes by 3.8; it is not a runtime cap.
MEMORY.md uses at most 23 KB by default.
- Keyword hits take about 5 to 11 ms over 50,000 turns. A semantic fallback scans indexed turns linearly, so a miss gets slower as the index grows.
The FAQ covers data paths, privacy limits, tokens, semantic search, proof commands, and performance.
Quick start ·
What it does ·
Commands ·
Memory workflow ·
Claude instructions
Comparison ·
FAQ
Why "subrosa"?
The name comes from the Latin phrase sub rosa, meaning private or confidential.
Quick start
Inside Claude Code, run:
/plugin marketplace add ij5a/subrosa
/plugin install subrosa@subrosa
Start a new Claude Code session after installation. The plugin downloads the right prebuilt program, about 2.5 MB, and checks its checksum. After a plugin update pins a new release, the next session start replaces that program. A subrosa you install yourself, on PATH or in ~/.cargo/bin, runs first, and the plugin never replaces it.
It also archives sessions already on your disk, then archives sessions while you work and when they end. It shows related past sessions in Claude's context and reports sessions waiting for long-term memory.
The program download fetches only the program. Your data stays on your machine.
Run this command to add the optional Claude instructions:
~/.claude/subrosa/bin/subrosa init --claude-md # or: subrosa init --claude-md
The instructions make Claude search the archive at task start and process queued checkpoints. Re-running adds only missing sections. They add about 250 tokens of context.
Optional: install the subrosa command
The plugin works without the CLI. Install it to search and manage the archive yourself.
brew install ij5a/tap/subrosa
curl -fsSL https://raw.githubusercontent.com/ij5a/subrosa/main/install.sh | sh
cargo install --git https://github.com/ij5a/subrosa
The plugin uses a subrosa binary on PATH when one exists. Use these commands first:
subrosa setup # choose a backup mirror, or none
subrosa # open the dashboard
What it does