# memory plugin for Claude Code

Stop re-explaining your branch to Claude.

A new session gets the goal, ticket, PR, commands and last answer from the last session on the same branch.

No API key, no model endpoint: Monot runs on the claude command you already use.

[ sh ]
curl -fsSL https://raw.githubusercontent.com/rajnandan1/monot/main/install.sh | sh
claude plugin marketplace add rajnandan1/monot
claude plugin install monot@monot
[ prompt ]
Install Monot, the memory plugin for Claude Code, on this machine. Show me each command before you run it.

1. Run `uname -sm`. Monot supports only macOS on Apple silicon, which prints `Darwin arm64`. If it prints anything else, stop and tell me.
2. Run the install command: `curl -fsSL https://raw.githubusercontent.com/rajnandan1/monot/main/install.sh | sh`
3. Check that `~/.local/bin` is on my PATH. If it is not, ask me before you edit any shell profile.
4. Run `monot version`. It must print a version number.
5. Run `claude plugin marketplace add rajnandan1/monot`.
6. Run `claude plugin install monot@monot`.
7. Tell me to restart Claude Code or start a new session, because the hooks load when a session starts.
8. Tell me how to check the install: open a session in a git repo, on a branch other than main or master. Send one prompt and wait for the answer. Then run `find ~/.monot/repos -path '*/handoffs/*.md'`. It must list a handoff record for that branch.

macOS on Apple silicon, with Claude Code logged in. install guide

A made-up example: what Monot adds before Claude reads your prompt.

youpick up ABC-12, the Windows job still times out
monot adds this before claude reads your prompt
Handoff record for branch abc-12-empty-rows, last written 2026-09-30T17:42:08Z by an earlier session on this task (github.com/acme/exporter/handoffs/abc-12-empty-rows). It reflects what was true then; check the working tree before acting on it.

## Goal
Fix ABC-12 so exports stop failing on empty rows
## Identifiers
tickets: ABC-12
prs: #48
paths: src/export.rs, tests/export.rs
commands:
- cargo test export
## Last ask
open the PR and wait for CI
## Last answer
Opened #48. CI passes except the Windows job, which times out in `cargo test export`. Next: find out why Windows is slow.
Recalled memories from earlier sessions (Monot). They reflect what was true when written. Full text: mcp__plugin_monot_monot__recall with the address.
- gotcha 2026-09-28 github.com/acme/exporter/windows-runner-timeout: The Windows CI runner kills any single test that runs longer than 60 s.

Yesterday a session worked on ticket ABC-12, on the branch abc-12-empty-rows. Today you open a new session in the same repo and send one prompt. The first block is the handoff record of the branch: its goal, its identifiers (exact names such as tickets, PRs and paths), the last ask and the last answer. The last block, a header line and one memory line, is the recalled memory. Each memory has an address, a stable ID such as github.com/acme/exporter/windows-runner-timeout, that Claude can use to read the whole memory.

# without monot

A new session starts blank.

It does not know the ticket, the pull request, the commands that worked, or what you asked last. So you type it all again in your first few prompts.

without monot

  • we're on ABC-12, exports fail on empty rows
  • the PR is #48, CI passes except the Windows job
  • it times out in cargo test export
  • find out why Windows is slow

You type four prompts before the work starts.

with monot

  • pick up ABC-12, the Windows job still times out

Claude starts with the PR number, the failing command and a likely cause: the Windows runner kills any test that runs longer than 60 s. You did not type any of it again.

# how it works

Plain files and one small binary.

Monot is a Claude Code plugin and one Rust binary, monot. The plugin holds hooks, which Claude Code runs at fixed moments, and an MCP server, which gives Claude tools. Every hook and the MCP server run the binary.

~/.monot/repos/github.com/acme/exporter/
├── windows-runner-timeout.md   # a fact
└── handoffs/
    ├── abc-12-empty-rows.md    # one record per branch
    └── retired/                # not updated for 7 days

main and master are never tasks, so they get no record. A / in the branch name becomes -- in the file name. The record is plain Markdown. If you add your own section by hand, Monot keeps it.

MAX_LINES  3      # the most memories on one prompt
MAX_CHARS  1040   # about 400 tokens
GATE       1.50   # the lowest score that passes
MIN_ROWS   10     # with fewer memories stored, inject nothing

The names are the constants in src/index.rs. The score says how well a memory matches the prompt. A higher score is a better match. A memory with a lower score still passes when it shares a ticket ID, a PR number or a path with the prompt.

recall     reads a memory by its address, or searches past the gate
remember   stores a new fact
forget     deletes one fact that Monot wrote
stats      shows one row of counts per day

You do not call the tools yourself. You tell Claude, for example, “remember that the Windows runner kills tests after 60 s”, and Claude calls remember.

decision     what someone decided, and why
preference   how you want the work done
pointer      where something lives: a path and a symbol name
state        the status or the next step of a ticket, PR or branch
gotcha       surprising behavior that someone found

Each fact that Monot writes has one of these five types. A state fact expires 14 days after Monot writes or replaces it.

# what monot leaves out

A recalled memory has to clear the bar.

Monot adds little on purpose, so Claude's context stays small. The bar is the gate from figure 4. If no memory clears it, recall adds nothing. A pick can add one more memory per prompt, chosen by an LLM in the background, and rules 04 and 05 apply to it too.

  1. A fixed cap.At most 3 memories per prompt, about 400 tokens in all.
  2. A measured threshold.A memory needs a score of 1.50, or a ticket, PR or path your prompt names. The eval, a set of scripts that measure how well recall works, picked 1.50.
  3. Quiet until it has enough.With fewer than 10 stored memories, or on a prompt under 4 words with no ticket, PR or path, recall adds nothing.
  4. Out-of-date memories stay out.A state fact expires after 14 days. A pointer drops when its file or code symbol is gone.
  5. No repeats.A memory comes once per context window, never back to the session that wrote it, and never when it only repeats a path your prompt names.

# memory layers

Each memory has a scope.

A memory's scope is the set of sessions that can recall it. A handoff record belongs to one task: one branch of one repo. Facts, the short memories that Monot writes, and Claude Code's built-in memory (the memory files that Claude Code itself keeps for a project) belong to the repo, so every branch and every worktree (a checkout of the repo in its own folder) can recall them. Global memories belong to no repo, so every repo can recall them.

~/.monot/ and the built-in memory, made-up names

  • ~/.monot/
    • global/global memories
    • repos/github.com/acme/one owner, two repos
      • exporter/the repo's facts, one file per fact
        • windows-runner-timeout.mda gotcha
        • export-header-format.mda decision
        • handoffs/one handoff record per branch
          • abc-12-empty-rows.mdbranch abc-12-empty-rowshandoff
          • feat--x.mdbranch feat/x: a / becomes --this other branch's record reaches the session only when a prompt names a ticket from it, or names a document (.md, .txt …) that this record mentions
          • mainno record: main and master are never tasks
          • retired/records with no update for 7 days; never injected
      • web/sibling repo: same owner
        • handoffs/abc-40-login.mda record of webthis other repo's record reaches the session only when a prompt names a ticket that is in it and in no eligible exporter record (one that this context window did not get yet, that is not retired, and that this session did not write alone), or names a document that this record mentions
  • ~/.claude/projects/<slug>/memory/exporter's built-in memory; Monot only reads it

a session on branch abc-12-empty-rows

Each route below adds text to Claude's context. The session follows the branch that its worktree is on. If one session switches the branch, every session in that worktree moves to the new task.

  • handoffThe record of its own branch, when a new session continues the task. At most once per context window (all the text that Claude sees at one time).
  • recall, each promptAutomatic: at most 3 memories per prompt from exporter's facts, the built-in memory and global/. The gate, the score rule in figure 4, decides which.
  • picksOne memory per prompt from the same three places, chosen by an LLM in the background. On by default.
  • mcp toolsWhen Claude calls them, on the same three places: the recall tool reads a whole memory or searches past the gate; remember and forget store or delete a fact.
  • extractionAfter the session ends, a background worker writes new facts to exporter/.
Figure 7. Monot's folders as a tree, and the routes by which each part reaches one session.

# where your data goes

Your memories live in plain files on your machine.

Extraction and picks are on by default, and they are the only parts of Monot that send your text off your machine: both send it to Anthropic. Extraction sends the short form of each finished session (your prompts, Claude's text and one line per tool call), with the stored memories that are most like its new facts, so that Monot does not store one fact twice. A pick asks an LLM (a large language model, such as Claude) to choose one memory for your prompt: it is one more claude -p call per prompt. The call sends your prompt, the session so far, and the names and descriptions of stored memories. When your prompt has 10 words or fewer besides file paths, it also sends the text of a document that the prompt names. By default, a context window makes at most 10 pick calls, and the pick_cap line in ~/.monot/extract.toml changes that limit. Both run through claude, the command that runs Claude Code. With a Claude plan login they cost nothing extra; with an Anthropic Console login they are billed as API usage. To turn extraction off, add the line extract = false to ~/.monot/extract.toml. Sessions that run while extraction is off still wait for extraction, and the worker sends them when you delete that line. To turn picks off, set pick = false in the same file. To turn Monot's hooks off for one session, start Claude with MONOT=0 claude. The update check of a release build also goes online: when a session starts, at most once in 24 hours, it asks github.com for the latest release. It runs claude plugin update to update the Monot plugin, and while the plugin is older than the binary, a later session start can run that command again within the 24 hours. It sends no prompt, memory or session text. extract = false and pick = false do not stop it, and MONOT_UPDATE=0 does.

no API keyExtraction runs through your own claude command and its login. You set up no API key and no model endpoint (the web address of a model API): the first session writes Monot's settings file, ~/.monot/extract.toml.
no model waitClaude's answer never waits for a model call from Monot. A pick calls a model in the background, and Claude starts its answer without waiting for it.
~/.monot/holds Monot's memories and handoff records as plain Markdown files. The search index, ~/.monot/index.db, is a local SQLite file and only a cache.
one binarymonot runs every hook and the MCP server. Claude Code starts them, so you run no service of your own.
[REDACTED]Monot replaces each secret, such as an API key, with [REDACTED:<rule-id>]. It does this before it writes a handoff record, and before extraction or a pick sends text to Anthropic. The rules come from gitleaks, a secret scanner.
MONOT=0Start Claude with MONOT=0 claude to turn Monot's hooks off for one session. Its MCP tools still answer when Claude calls them.

# install

Three commands install Monot.

Run the three commands in your terminal, or paste the prompt into Claude Code and it runs them for you. The prompt also checks the machine, the PATH and the result. You need macOS on Apple silicon. You need no Rust and no API key. The first command checks the SHA-256 hash of the latest release and puts the binary at ~/.local/bin/monot, so ~/.local/bin must be on your PATH.

[ sh ]
# Download the latest release of the monot binary into ~/.local/bin.
curl -fsSL https://raw.githubusercontent.com/rajnandan1/monot/main/install.sh | sh

# Add this repo as a plugin marketplace, so Claude Code can find the plugin.
claude plugin marketplace add rajnandan1/monot

# Install the plugin: the hooks and the MCP server. They all run the binary.
claude plugin install monot@monot
[ prompt ]
Install Monot, the memory plugin for Claude Code, on this machine. Show me each command before you run it.

1. Run `uname -sm`. Monot supports only macOS on Apple silicon, which prints `Darwin arm64`. If it prints anything else, stop and tell me.
2. Run the install command: `curl -fsSL https://raw.githubusercontent.com/rajnandan1/monot/main/install.sh | sh`
3. Check that `~/.local/bin` is on my PATH. If it is not, ask me before you edit any shell profile.
4. Run `monot version`. It must print a version number.
5. Run `claude plugin marketplace add rajnandan1/monot`.
6. Run `claude plugin install monot@monot`.
7. Tell me to restart Claude Code or start a new session, because the hooks load when a session starts.
8. Tell me how to check the install: open a session in a git repo, on a branch other than main or master. Send one prompt and wait for the answer. Then run `find ~/.monot/repos -path '*/handoffs/*.md'`. It must list a handoff record for that branch.