Persistent, private memory for Claude Code — every session archived locally, searchable. Sub rosa.
> /plugin marketplace add ij5a/subrosa> /plugin install subrosa@subrosa
What's inside
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 relevant snippets when the match is strong.
curl child makes the one-time model download.MEMORY.md uses at most 23 KB by default.The FAQ covers data paths, privacy limits, tokens, semantic search, proof commands, and performance.
The name comes from the Latin phrase sub rosa, meaning private or confidential.
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.
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.
subrosa commandThe 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
/clear, or logout. SessionEnd returns after starting a detached worker. The worker retries ordinary SQLite contention, and a start-up sweep catches a worker that never ran.--project, --after, --before, --tag, --context, --exclude, --any, and --fuzzy to narrow results.subrosa search --semantic. Automatic semantic search runs only after a plain search has zero hits and the local model and index are ready./subrosa:checkpoint and /subrosa:checkpoint-backlog. Each fact has a small Markdown file. subrosa generate writes the size-limited MEMORY.md, and subrosa fact search finds facts.subrosa related. It supports linked facts and read-only checks with subrosa fact link and subrosa fact doctor.subrosa # dashboard, same as: subrosa stats
subrosa search aurora failover # keyword search
subrosa search --project api deploy # project scope
subrosa search -n 30 --raw 'cache OR redis' # raw FTS5 query
subrosa search --fuzzy ratelimiter # partial names and small typos
subrosa search deploy --after 2026-05-01 # YYYY-MM-DD, inclusive; use --before too
subrosa search api --tag tool:kubectl # tag filter; repeat --tag to require all
subrosa search pgbouncer -C 2 # show nearby turns
subrosa search timeout --exclude test # exclude a term; repeat to add more
subrosa search redis valkey --any # match any term, not all terms
subrosa embed # update the semantic index
subrosa embed --rebuild # rebuild semantic vectors
subrosa search --semantic 'why did checkout get slow' # semantic search
subrosa related cache-prod # co-occurring terms and sessions
subrosa related TICKET-123 --project api # scoped related search
subrosa sessions # sessions, newest first
subrosa sessions --tag topic:cache-prod --after 2026-05-01
subrosa session <id> --tags # session and derived tags
subrosa fact list # facts for the current project
subrosa fact search pgbouncer # search facts
subrosa fact upsert --leaf note.md # add or update one fact
subrosa fact link auth-decision # linked facts and dead links
subrosa fact doctor # read-only; exit 1 on a break
subrosa generate # rebuild MEMORY.md
subrosa import ~/.claude/projects/<project>/memory # import an existing MEMORY.md
subrosa session <id> # full ID or unique prefix
subrosa pending # queued checkpoints
subrosa checkpoint-drop <id> --max-seq N # remove a verified queue prefix
subrosa sweep # catch up on transcripts
subrosa backup --force # make a snapshot now
subrosa restore <mirror>/subrosa-latest.db.enc # decrypt an encrypted snapshot
subrosa setup # choose the backup mirror
ACTION REQUIRED note for queued sessions. The note goes to Claude's context, not your chat window.checkpoint_nudge=quiet or off to change the reminder./subrosa:checkpoint-backlog to save durable facts from queued sessions. Run /subrosa:checkpoint before /clear or /compact to save the live session.subrosa generate builds MEMORY.md under a byte budget. Pinned facts and feedback win when space is limited. Other facts stay searchable in the archive.Recall runs only when you type a prompt. Add these sections to CLAUDE.md so Claude also searches at task start and handles queued checkpoints.
~/.claude/CLAUDE.md covers every project. A repository CLAUDE.md covers that repository. Run subrosa init --claude-md to add both sections safely.
## Memory recall (subrosa)
Every past Claude Code session is archived locally and searchable with
`subrosa search "<keywords>"` — scope with `--project <name>`, narrow by date or
tag with `--after`/`--before`/`--tag`, more results with `-n 20`, and retry with
`--fuzzy` if an exact search finds nothing (partial names, small typos).
(If `subrosa` isn't on PATH, it's at `~/.claude/subrosa/bin/subrosa`.)
At the start of any task — investigating, debugging, designing, reviewing, or when
a ticket, environment, resource, person, or past decision comes up — search the
archive first and build on what past sessions already worked out instead of
starting cold. Announce the search ("Searching past sessions for [topic]...") and
cite hits with their date. Skip only for trivial one-liners. `MEMORY.md` is
generated — never hand-edit it; update facts with `subrosa fact` + `subrosa generate`,
or run `/subrosa:checkpoint`.
A plain exact miss also tries semantic search when automatic indexing is on and its local index is available. Use --fuzzy for partial names and small typos.
## Memory auto-checkpoint (subrosa)
When a `[subrosa] ACTION REQUIRED` note says sessions are queued for checkpoint
(or `subrosa pending` is non-empty), run the `/subrosa:checkpoint-backlog` skill
in the background — never before or blocking the task you're working on. It saves
the durable facts from each queued session into that project's memory, then clears
the queue as it finishes. Skip it silently when nothing is queued.
The first section searches during a task. The second clears queued checkpoints.
See Where is data stored? for paths, permissions, config, and mirror rules.
See Can data leave my machine? and What does subrosa not protect?.
See Proof for commands that check token limits, network behavior, model pinning, and dependencies.
See Performance for measured times and the archive-size limits.
mise install
git config core.hooksPath .githooks
mise exec -- cargo fmt --check
mise exec -- cargo clippy --all-targets -- -D warnings
mise exec -- cargo test --locked
The golden tests pin stored text, session dumps, MEMORY.md, recall output, and other output formats byte for byte. Use a throwaway directory for manual tests:
mise exec -- env SUBROSA_DIR=/tmp/x SUBROSA_PROJECTS_DIR=/tmp/x/projects cargo run -- init
MIT
FAQ
subrosa is a Claude Code plugin with 2 hand-picked skills for data work, indexed on Flowy. Install it with the command on its page. It includes checkpoint-backlog, checkpoint. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it