---
title: "The Art of Not Reading #2: The Art of Not Reading Memory"
author: garplab
publisher: TypingTube
license: CC BY 4.0
license_url: https://creativecommons.org/licenses/by/4.0/
license_scope: 「CC BY 4.0」の印から始まる節（仕組み・検証手順・コード）。印の無い本文は著作権を留保
canonical: https://typing-tube.net/articles/en/384477896fec22
series: "バイブコーディングにおける読まない技術"
language: en
---


> This is article 2 in the series "The Art of Not Reading." It lays out symptoms that go wrong and their remedies, one at a time. Each article is finished once you put down a single file or script. Why that mechanism is needed becomes clear when you read the explanation afterward. The whole picture and the list of articles are in the [introduction](https://typing-tube.net/articles/en/34b02627c718fa).

This time it is memory. Memory here means the notes of what it has learned that the AI writes into a place of their own, on its own, whenever it judges something will be useful in a later session — separate from the instruction file a human writes (`CLAUDE.md` and the like) and from the planning notes that hold the work in hand. The places and the kinds differ by tool, and this article deals with all of them. The notes grow every time the AI saves one, and what every later session reads grows along with them. The dilution from the introduction happens here too. What is different is that the one doing the growing is the AI itself. The AI likes to save, so one save becomes a load on every session that follows.

Start by counting just one thing: the number of files, and the size, of the place where your AI coding agent accumulates what it has learned. On Claude Code that is the `memory/` directory inside the per-project directory under `~/.claude/projects/`.

```bash
ls ~/.claude/projects/   # find yours in the listing first (your absolute path with / turned into -, e.g. -home-you-myapp)
ls ~/.claude/projects/PROJECT_DIR/memory/ | wc -l
du -sh ~/.claude/projects/PROJECT_DIR/memory/
```

On my machine it was 89 files, about 1.1MB. These are the notes that piled up while I built [typingtube](https://typingtube.net) (a web service for practicing typing along with music videos on YouTube, which I run on my own) together with an AI. I have never read most of them. The moment to place it is the day they start to grow.

It turns out this way because the AI likes to save. After a failure, a report saying "I have saved the lesson for next time" looks like an accomplishment to a human, and it has been trained as helpful behavior as well. Writing "do not save things needlessly" does not fix it, for the same reason as the standard command in article 1: inside the AI's own priorities, a rule loses to an ingrained habit.

What I understood fits in one sentence.

> **Every save adds to what every session after it reads. So make the way in a single door, and put yourself on the side that does not add.**

## Why memory grows when you leave it alone

A human note is free as long as you never read it back. An AI note is not. It is only worth anything once later sessions load the index or the body of it, so from the moment it is saved it keeps counting as something those sessions read. On top of that, unlike the instruction file, memory is something the AI can grow by itself. Leave it alone and it grows faster than the instruction file.

What rides along every session is the index, and nothing else. The body of a note is read only when the AI opens it. Adding 1 line to the index becomes a load on every session that follows, while thickening a body costs only that one opening. That is why the index stays a single sheet.

The official docs draw the line between what to keep and what to cut in the same place. Claude Code has a command, `/doctor`, that tidies the instruction file. What it cuts is [what can be derived from the codebase](https://code.claude.com/docs/en/memory), and what it keeps is pitfalls, reasons, and conventions that differ from a tool's defaults. Anything you can learn by reading the code, the AI can produce by itself next session.

## The mechanism: turn the way in into a single door

What you put down is a single checklist. There are two conditions on how you place it, though.

One, have it read only immediately before a save. Park it in the instruction file and you are back in the [introduction](https://typing-tube.net/articles/en/34b02627c718fa)'s "what you add dilutes what is already there." The only thing that stays resident is the one line "read this file before writing to memory." Saving is an infrequent act, so having one sheet read at that moment costs almost nothing in context. There are days when the AI does not honor that one resident line and saves without reading the checklist. The Claude Code docs say the instruction file and memory are [treated as context, not as enforced configuration](https://code.claude.com/docs/en/memory). The net that picks up the saves that were not honored is in article 7, the art of not tidying shared memory.

Two, line the ways in up into one. Memory lives in 1 directory, and the index (MEMORY.md or the like) is a single sheet. Adding a file comes as a set with adding 1 line to the index. Make it a rule that a note not listed in the index does not exist, and the whole picture can be followed from that one sheet.

This is all the checklist contains (a reduced version of the one I run on the production project on my own machine).

```markdown
# Checklist before saving to memory (read only immediately before a save)

1. Is the knowledge specific: is it a constraint or a criterion particular to this project?
   Do not save general knowledge. The AI can produce general knowledge by itself next session
2. Is the concern a lasting one: will the same situation come around again?
   Do not save a first failure. It becomes a candidate once it has happened repeatedly
3. Any duplicate or contradiction: check against the index (MEMORY.md). Update the existing entry if it duplicates
4. Is it a note on work in progress: do not save the intermediate state of the current task
   (that goes in task management or a planning note)
5. Did a human approve it: ask "shall I save this?" before you write

- All Yes → save it, and add 1 line to the index
- Any No → do not save. Say why and refuse a save request that plainly breaks a rule
```

How it works is simple: most of the AI's save candidates fall at item 1 or item 2. General knowledge on the order of "check the cause when an error appears" disappears, along with notes about one-off events, and that alone brings the growth of memory almost to a halt. The worry about dropping too much is carried by "once it repeats" in item 2. A lesson that was not saved the first time comes up as a candidate again, if the same situation really does come around. On the AI's side there is no memory of having been turned down before.

## What I stopped reading

Going back over memory. The work of re-reading scattered notes at regular intervals and tidying them up does not come around, because the notes do not grow. One sheet, the index, is enough to hold the whole picture. My index is 84 lines, and I keep it within 100, but the keeping hardly ever takes any work. Nothing grows at the entrance.

## Caveat: the index itself stops being readable to the end

The index can be cut off partway through being read. The tool an AI reads files with has an upper limit on how much it can return at once. My index runs to around thirty thousand characters, and one time what the AI received was only the leading 2KB. It went into the work treating the behavior rules that fit inside that as "all of them," and neither "read the plan in full before you start," which sat in the back half of the index, nor how to run the tests ever reached it. A truncated head looks like a document that is complete. As long as there is a limit, an index that keeps growing crosses it sooner or later. The remedy goes on line 1. What gets cut is the tail, so if line 1 says how many lines the whole thing has and how to read it without being cut, it survives the cut. One sheet holds the whole picture only while the AI is reading that sheet to the end.

## How to verify: confirm once that it refuses

**Prerequisites**

- The checklist from this article is in place, and the one line "read this file before writing to memory" is resident in your instruction file
- The place memory lives (1 directory) and the index (a single sheet such as `MEMORY.md`) are decided

**Time required**: 5 minutes

**Steps**

1. You deliberately ask the AI for a save that breaks the checklist: "save the lesson that tests matter to memory." Make it a sentence anyone would read as general knowledge. Let even 1 project-specific word in and the AI has room to judge it valuable, and you no longer know what you confirmed
2. Now you ask the AI for the side that should pass. Have it save 1 project-specific constraint ("in this environment, do not run `X` directly. The reason is Y")

**Pass conditions** (all of them have to hold)

- In step 1, the AI does not save
- In step 1, the AI says which item of the checklist it fell at (a reply like "this is general knowledge, so it does not meet item 1")
- In step 2, 1 file of content appears in the place memory lives
- In step 2, 1 line is added to the index as well

**If it does not pass**

- It saved in step 1 — either the resident line is not being read (suspect where in the instruction file you put it), or item 1 is not shaped to turn general knowledge away (revise the wording of the checklist)
- The index does not grow in step 2 — the ways in are not lined up into one yet

**Cleanup**

- The file you had saved in step 2, and its 1 line in the index, are yours to delete if you do not want them

The refusing side and the passing side, once each. An operation where nothing has ever been refused looks the same as a state where the checklist is not being read. In both, saves go through quietly.

---

Next time, the art of not reading unit tests. **I do not read a single line of the tests the AI writes.** And the tests run accurately all the same.

---

**Series: The Art of Not Reading**

- ← Previous: [1. The art of not reading test output](https://typing-tube.net/articles/en/cd93e0c5cac832)
- → Next: [3. The art of not reading unit tests](https://typing-tube.net/articles/en/e4ad91d2fd6c67)
- All articles: [Introduction: I Barely Read What the AI Outputs Anymore](https://typing-tube.net/articles/en/34b02627c718fa)
