# 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.

Last updated: 2026-10-04 · jevmem 0.6.4 · [Install](https://avinash-jetwani.github.io/jevmem/install/) · [Source on GitHub](https://github.com/Avinash-jetwani/jevmem)

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](https://github.com/Avinash-jetwani/jevmem/blob/main/results/ab-2026-09-28.json), [jevmem](https://github.com/Avinash-jetwani/jevmem/blob/main/results/ab-jevmem-2026-09-29-3b.json); [method and limits](https://avinash-jetwani.github.io/jevmem/results/)).

## Why a file

Each Claude Code session starts with a fresh context, so what you decided last week lives in last week's chat.
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.

## How jevmem does it

![You say it, Jev decides, jevmem writes one line to JEVMEM.md, and next session Claude gets the lines that matter.](https://avinash-jetwani.github.io/jevmem/img/how-it-works-light.svg)

1. You decide something in a chat: "We use Postgres."
2. jevmem asks [Jev by TypeSafe AI](https://typesafe.ai), a model that answers yes/no questions with probabilities, whether it's worth keeping.
3. If it is, jevmem writes one line to `JEVMEM.md` in your repo.
4. 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).

```text
- [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:

```text
- [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](https://github.com/Avinash-jetwani/jevmem/blob/main/results/readme-example-2026-09-26.txt), 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](https://avinash-jetwani.github.io/jevmem/whats-new/)). With `writer` set, an OpenAI or Anthropic model condenses the whole turn instead.

## Set it up

You need a [TypeSafe API key](https://console.typesafe.ai/keys) and Claude Code 2.1.273 or later.

1. In the Claude app: **Plugins → Discover → jevmem → Add**.
2. Install the CLI the plugin runs:
   ```bash
   npm install -g jevmem
   ```
3. Save your key (paste it when asked; it isn't shown):
   ```bash
   jevmem key
   ```
4. In your project's folder, turn jevmem on:
   ```bash
   jevmem enable
   ```

Start Claude Code in that project. `jevmem doctor` checks the setup.

**Other ways to install: the jevmem marketplace, npm, Cursor, Codex**

From the jevmem marketplace:

```bash
npm install -g jevmem
claude plugin marketplace add Avinash-jetwani/jevmem
claude plugin install jevmem@jevmem
cd your-project && jevmem enable
```

With npm only (also sets up Cursor and Codex):

```bash
npm install -g jevmem
cd your-project
jevmem init --tool claude    # or cursor, codex, claude-desktop, all
```

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](https://avinash-jetwani.github.io/jevmem/install/).

## 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](https://github.com/Avinash-jetwani/jevmem/blob/main/docs/how-it-works.md#the-read-side-one-call-per-prompt-srcrecallts)) |
| 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 | Not measured here | You edit it (history if the file is in git) | The old line stays, tagged `[superseded] … → id:new`, so history and blame survive |
| Corrections | Edit its files | Edit the file | `right` / `wrong` / `missed` labels, and `fit` retunes the thresholds to your judgement |

Claude Code's auto memory and instruction files are described at https://code.claude.com/docs/en/memory (read 2026-09-28; its [AGENTS.md section](https://code.claude.com/docs/en/memory#agents-md), 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 belong in `CLAUDE.md`.** Jevmem puts a line in front of Claude when Jev judges it relevant to the prompt at hand. A rule that holds for a whole class of changes, with nothing in a given prompt pointing at it, can be 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](https://github.com/Avinash-jetwani/jevmem/blob/main/docs/benchmark.md#outcome-ab-does-claude-act-on-the-memory)). So put the rules every task must follow (a convention for all code, how every commit is made, what must never be run) in `CLAUDE.md` or `AGENTS.md`, which the tools load at the start of every session. 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. The two work side by side. 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](https://avinash-jetwani.github.io/jevmem/compare/).

## The limits, in short

- jevmem needs a TypeSafe API key ([where to get one, and the install steps](https://avinash-jetwani.github.io/jevmem/install/)).
- Message text is sent to TypeSafe to be scored, with common secrets scrubbed first ([what leaves your machine](https://avinash-jetwani.github.io/jevmem/privacy/)).
- It is automatic in Claude Code, automatic in Codex while `jevmem watch` runs, and in Cursor only when the agent calls it ([what each tool does](https://avinash-jetwani.github.io/jevmem/install/#works-with)).
- Rules every task must follow still belong in `CLAUDE.md` ([jevmem next to CLAUDE.md](https://avinash-jetwani.github.io/jevmem/compare/)).
- The guard is a backstop, not a sandbox ([what it misses](https://avinash-jetwani.github.io/jevmem/guard/#limits)).

Every limit, with the numbers: [the FAQ](https://avinash-jetwani.github.io/jevmem/faq/#what-are-jevmems-limits).
