How do I make Claude Code remember project decisions across sessions?
Keep the decisions in a file that Claude Code is given again in the next session: you can write a CLAUDE.md by hand, or let jevmem do it, which saves the decisions, rules and failed approaches from your Claude Code chats to JEVMEM.md in your repo, and brings the relevant ones back next session.
In 72 real Claude Code sessions, Claude followed the project's saved decision in 66 with jevmem (66/72), in 28 with no project memory (28/72) and in 67 with the same lines in a hand-written CLAUDE.md (67/72). That was measured on 24 tasks in three small projects of 34 to 42 saved lines, 3 runs each, with Claude Code 2.1.281 and claude-sonnet-5, on 2026-09-28 and 2026-09-29 (no memory and CLAUDE.md, jevmem; method and limits).
Claude Code also keeps notes of its own, auto memory, on by default. Measured side by side (0.7.7, 558 real sessions on three new projects, claude-fable-5-1), Claude followed a fact taught in an earlier session in 47 of 54 sessions with auto memory alone, 40 with jevmem alone and 45 with both (49, 40 and 48 after every miss was read by hand); with jevmem on, no change a rule forbade was left in the code (every row).
Why a file #
Each AI coding session starts with a fresh context, and a rule your team agreed lives in one person's chat, on one machine, in one tool.
A CLAUDE.md file helps if you keep it up to date. jevmem keeps a file like it up to date for you, as you work, shares it with your team through git, gives it to Claude Code, Cursor and Codex, and checks Claude's commands against it.
How jevmem does it #
You chat as usual. When you decide something, jevmem writes it as one line in a file in your repo, and brings the right lines back next session.
- You decide something in a chat: "We use Postgres."
- jevmem asks Jev by TypeSafe AI, a model that answers yes/no questions with probabilities, whether it's worth keeping.
- If it is, jevmem writes one line to
JEVMEM.mdin your repo. - Next session, the lines that matter for your prompt go back to Claude.
Change your mind, and the old line is crossed out: kept for history, not sent to Claude. Your team gets the same file through git.
jevmem keeps decisions, rules, bugs, to-dos and dead ends (an approach that was tried and failed, with the reason).
- [superseded] We'll use SQLite as the primary store for now. → id:cuasaq
- [decision] Switch the primary store to Postgres 16.
- [constraint] Node 20 is the minimum supported version, and CI runs Node 20 and 22.
About these lines
Each line also carries a comment with its id, time and confidence, left out above. The full lines:
- [superseded] We'll use SQLite as the primary store for now. → id:cuasaq <!-- id:21ycba ts:2026-09-26T13:46:34.703Z conf:1.00 by:cuasaq -->
- [decision] Switch the primary store to Postgres 16. <!-- id:cuasaq ts:2026-09-26T13:46:35.240Z conf:1.00 -->
- [constraint] Node 20 is the minimum supported version, and CI runs Node 20 and 22. <!-- id:tollba ts:2026-09-26T13:46:35.763Z conf:0.90 -->
Real lines from 0.5.7's default writer, which 0.5.8 to 0.5.10 did not change (the run, 2026-09-26). It kept one sentence of each turn: the Postgres turn also said "SQLite locks up under concurrent writes", and that reason was left out. Since 0.6.0 the line is made from the sentences Jev picks, the one that states the memory and the one that gives its reason (What's new). With writer set, an OpenAI or Anthropic model condenses the whole turn instead.
Rules for every change, past sessions, and a line you no longer want #
- Rules every change must follow (0.7.1): a line jevmem marks always-on (Jev reads it as a standing rule for how any work in the project is done;
jevmem always <id>marks by hand) reaches Claude at the start of every session, whatever the prompt, through aSessionStarthook that readsJEVMEM.mdand nothing else. On six held-out tasks whose files were written before their conventions, Claude followed the convention in 14 of 18 sessions with 0.7.0 and 18 of 18 with 0.7.1, as with the same lines in a hand-keptCLAUDE.md(one run each, 2026-10-13: 0.7.0, 0.7.1; method and limits). - Memory from past sessions (0.7.1):
jevmem import --from sessionsreads the project's past Claude Code sessions and proposes the decisions, rules and dead ends in them, after showing the count and the cost and asking;--applywrites them. On 12 real held-out sessions with 27 turns it read every turn and proposed a line for all 17 turns labelled to give one, and 4 more from turns labelled skip (one run, 2026-10-13, results). - A line you no longer want (0.7.0):
jevmem forget <id>retires it in place. It stays inJEVMEM.mdas[retired], and nothing serves or enforces it;jevmem wrong <id> --should-be nonedoes the same.
Set it up #
You need a TypeSafe API key, which jevmem's requests are billed to, and Claude Code 2.1.273 or later.
- In the Claude app: Plugins → Discover → jevmem → Add.
- Install the CLI the plugin runs:
npm install -g jevmem - In your project's folder, finish the setup in one go (it asks for your key without showing it, turns jevmem on in that folder, and checks the setup):
jevmem setup
Start Claude Code in that project. If you start it before the setup is done, the plugin says once what is left; jevmem doctor checks the setup any time.
Other ways to install: the jevmem marketplace, npm, Cursor, Codex
From the jevmem marketplace:
npm install -g jevmem
claude plugin marketplace add Avinash-jetwani/jevmem
claude plugin install jevmem@jevmem
claude plugin install jevmem-pane@jevmem # the side pane (0.7.5), optional
cd your-project && jevmem setup
With npm only (also sets up Cursor and Codex):
npm install -g jevmem
cd your-project
jevmem init --tool claude # or cursor, codex, claude-desktop, all
In Cursor, the jevmem plugin (0.7.6) carries the hooks, the MCP server and the rule for every window: install it from the Cursor Marketplace once it is listed there, or copy this repository's cursor-plugin/ folder to ~/.cursor/plugins/local/jevmem and reload the window; then jevmem setup in each project (the steps). jevmem is also listed on cursor.directory; its Add to Cursor button installs the MCP server alone (recall, with the entry in docs/mcp.md), so saving still needs the plugin folder or jevmem init --tool cursor.
Already have a CLAUDE.md? jevmem import shows what it would add from it; --apply writes it.
Every step, and what to do if the plugin can't find the CLI: docs/install.md.
CLAUDE.md, auto memory and jevmem side by side #
There are two kinds of memory besides Jevmem, and it replaces neither. Auto memory is per tool and per machine. Project instruction files are per repository, and one of them is not tied to a tool: AGENTS.md is read by Claude Code (2.1.277 or later), Cursor and Codex. What Jevmem adds is a file that is kept current for you and read per prompt.
Built-in auto memory (e.g. Claude Code's, under ~/.claude/projects/… on your machine) |
Project instruction files (CLAUDE.md, AGENTS.md, .cursor/rules/) |
Jevmem | |
|---|---|---|---|
| Scope | Per tool, per machine. Claude Code's is on by default, machine-local, and one folder per repository (its worktrees share it) | Per repo. AGENTS.md is read by Claude Code (v2.1.277 and later; by default only when there is no CLAUDE.md), Cursor and Codex; CLAUDE.md by Claude Code; .cursor/rules/ by Cursor |
One JEVMEM.md per repo, read by Claude Code, Cursor, Codex and Claude Desktop |
| Shared with the team | No | Yes, committed files reviewed in PRs | Yes, a committed file reviewed in PRs |
| What a session sees | Claude Code: the first 200 lines or 25 KB of its MEMORY.md index at the start of every session; the notes it points to when Claude opens them |
The whole file (Claude Code: up to 4 MiB), at the start of every session | The lines Jev judges relevant to each prompt, at most five (The read side), and since 0.7.1 the lines marked always-on, at the start of every session (Always-on rules) |
| Who keeps it current | The tool (Claude Code: Claude, when it judges a note worth keeping) | You, by hand | Jevmem, after every Claude Code turn (and Codex turns under watch, and agent add_memory calls) |
| Why a line exists | No per-line scores that we know of | You wrote it | Per-line scores on the machine that saved it: jevmem why <id> shows every noul, the kind distribution, importance, and which threshold it cleared |
| What happens on a reversal | Claude rewrites the note, or its index line, in place (the docs do not say; in the 0.7.7 comparison it rewrote or removed the old index line and rewrote the old note in 12 of 12 changed decisions) | You edit it (history if the file is in git) | The old line stays, tagged [superseded] … → id:new, so history and blame survive (0.7.7 comparison: superseded in 6 of 12 changed decisions with jevmem alone, 9 of 12 with auto memory on too) |
| Measured side by side (0.7.7) | Followed a line taught in an earlier session in 47 of 54 sessions (49 after reading every miss by hand) | The same line written into CLAUDE.md: 45 of 54 (46) |
40 of 54 (40) alone, 45 of 54 (48) with auto memory on; no forbidden change left in the code. Every row |
| Corrections | Edit its files | Edit the file | right / wrong / missed labels, and fit retunes the thresholds to your judgement; since 0.7.0 jevmem forget retires a line in place and jevmem trust marks one you wrote as verified; since 0.7.1 jevmem always marks a rule for every change |
Claude Code's auto memory and instruction files are described at https://code.claude.com/docs/en/memory (read 2026-09-28, and again on 2026-10-24 for Claude Code 2.1.306: every fact in the table still held; since then the docs add the switches autoMemoryEnabled, CLAUDE_CODE_DISABLE_AUTO_MEMORY and --bare, and an error when a write leaves MEMORY.md over its 200 lines or 25 KB, and say nothing on what happens to a note when a decision changes; its AGENTS.md section, read 2026-09-29, gives v2.1.277 and when AGENTS.md loads instead of CLAUDE.md). AGENTS.md in Cursor: https://cursor.com/docs/context/rules; in Codex: https://developers.openai.com/codex/guides/agents-md; the format: https://agents.md (all read 2026-09-29). The instruction files are shareable today; Jevmem's difference is that it maintains its file automatically and scores each line. Both can run at once; the end-to-end harness checks that Jevmem behaves the same with Claude Code's auto-memory present or cleared.
Rules that must apply to every task: always-on since 0.7.1. Jevmem puts a line in front of Claude when Jev judges it relevant to the prompt at hand, so a rule that holds for a whole class of changes, with nothing in a given prompt pointing at it, was missed: in the outcome A/B, the convention that every user-facing string goes through t() was never injected for a prompt to add a button, and Claude followed it in 0 of 3 sessions; with the same line in CLAUDE.md it did in 3 of 3 (Benchmark). Since 0.7.1 such a line is marked always-on, by Jev when it is saved or by jevmem always <id>, and reaches Claude at the start of every session (Always-on rules): on six held-out tasks written for that gap, Claude followed the convention in 14 of 18 sessions with 0.7.0 and 18 of 18 with 0.7.1, as with the same lines in CLAUDE.md (Benchmark). CLAUDE.md or AGENTS.md, which the tools load at the start of every session, still hold what you write by hand; the two work side by side. Leave the rest to Jevmem: the decisions, dead ends, bugs and facts that pile up as you work, which change as the project moves, are soon too many to load whole, and matter only when a prompt touches them. Jevmem neither reads nor changes CLAUDE.md (only jevmem import reads it, when you run it).
The same comparison with other memory tools for Claude Code: jevmem compared.
The limits, in short #
- jevmem needs a TypeSafe API key (where to get one, and the install steps).
- Message text is sent to TypeSafe to be scored, with common secrets scrubbed first (what leaves your machine).
- It is automatic in Claude Code and, since 0.7.4, in Cursor (as a Cursor plugin since 0.7.6, whose rule sits in every chat), automatic in Codex while
jevmem watchruns, and in Claude Desktop only when the agent calls it; in Cursor, bringing lines back is still the agent's call (what each tool does). - Rules every task must follow reach every session only when they are marked always-on (0.7.1), by Jev's reading or yours (jevmem next to CLAUDE.md).
- The guard is a backstop, not a sandbox (what it misses).
- The side pane is Claude Code only, 2.1.299 or newer: Cursor has no pane, and Claude Code for VS Code draws none yet (the pane).
Every limit, with the numbers: the FAQ.