DEV Community

Claude Code Forgets My Instructions as Compactions Pile Up. One Added Prompt Stopped It: 0 Lost After 3 Compactions

Murooka on November 13, 2026

This is an English version of an article first published in Japanese on Zenn. Introduction When you do long work in Claude Code, compac...
Collapse
 
appsbymo profile image
Apps by Mo •

Useful measurement, thank you. The part that matches my experience is that a decision to leave something out lives only in the conversation. I stopped trusting the summary for those and moved them out of the chat. Each decision gets one dated line in a short list (mine is headed “do not re-argue”), and every new session reads that list before it does anything. A compaction or a fresh session can then lose the wording of the chat without losing what was settled. I built that into Atelier, a Mac app I make for running Claude Code sessions, but a plain file the session must read first does the same job. Do you plan to measure whether Claude acts on the carried messages after round 3, not only whether they are still written down?

Collapse
 
murooka_az_dev profile image
Murooka •

Thank you, and you read it correctly: I only counted whether the messages were still written down. Whether Claude acts on them is not measured, and I don't plan to measure it. Whatever the result, it would describe today's models, and I expect that part to change as they improve, most likely for the better.

In daily use I'm also not running into it. This is a feeling, not a measurement, but I've stacked more than 10 handoffs in one line of work without hitting a problem. That is with the programmatic carry-over in my own extension, not with the pasted prompt.

On the list: I moved away from notes because, in my experience, the model forgets to write them down, and the ones it does write go stale. With documents especially, I often say "actually, this way is better" a little later, and then the note needs versions of its own. Carrying the original text doesn't make that go away either. When I have a model re-read meeting minutes where a conclusion was later reversed, it only works if I shape the search prompt carefully, and I'm still working that out. How do you handle a reversed decision in your "do not re-argue" list? No rush.

Collapse
 
appsbymo profile image
Apps by Mo •

Sorry for the slow answer, I missed the question at the end. I don’t keep both versions. Each decision is one line with its date, and when I change my mind the old line is rewritten, not followed by a new one, so a session never has to work out which of two lines wins. When the reversal is the point, the line says so: “Rejected: X, do Y instead”, which also stops the old idea coming back. The list stays short because it only holds what is true today; the history lives in the session notes, which nothing reads first. Your stale-notes point is real though: a line only stays right if rewriting it is part of making the change.

Thread Thread
 
murooka_az_dev profile image
Murooka •

Thank you, that makes sense. Rewriting the line in place, and writing "Rejected: X, do Y instead" when the reversal matters, keeps the list focused on what is true today, without two conflicting entries competing.

In my experience, leaving the updates to the agent leads to missed changes, while updating by hand breaks momentum. So I'm curious about that exact challenge you mentioned: when you pivot, do you rely purely on updating the line by hand, or have you built a lightweight trigger into your workflow or Atelier to catch it? No rush.

Thread Thread
 
appsbymo profile image
Apps by Mo •

Neither, mostly. Updating by hand broke my momentum too, so the session writes it: before a session ends, its handover step asks for the decisions settled in that conversation, and the agent records each one as a dated line, naming what it reverses, like “14 Nov: uses an API key after all, reverses 27 Oct”. I only read the list when the next session starts. What it still misses is a pivot I make in my head and never say in the chat.

Thread Thread
 
murooka_az_dev profile image
Murooka •

Thank you, this is a lovely idea.

Our setups differ in where the notes live. Mine starts from a TODO list: each work item has its own notes field, and that is where I keep things in enough detail to work from. Within a single line of work, nothing gets lost because the handoff carries the conversation itself along with the compact summary. Where it falls short is when a separate session opens that TODO item and reads only the notes. It doesn't always pick up the current state accurately. That's where your dated lines that name what they reverse will help, and I'd like to adopt that approach there.

Thanks again for walking me through it.

Collapse
 
maxritter profile image
Max Ritter •

Losing earlier instructions after a few compactions is why I keep important constraints out of the chat. With the approved plan as a file in the repo and past decisions in a memory server, a fresh or compacted session reads them again instead of relying on the summary. I built QualityLayer for this: github.com/maxritter/qualitylayer

Collapse
 
murooka_az_dev profile image
Murooka •

Thanks for sharing QualityLayer. Others in this thread have suggested the same, and I agree: keeping the plan and past decisions outside the chat is the starting point. What I'm after is the next step, running it without adding maintenance overhead.

Someone has to write those entries and keep them current. When several people share that memory store, one wrong entry reaches every session. But if people have to approve every entry to prevent that, human review becomes a bottleneck as agents get faster. In QualityLayer, who writes and updates the decisions in the memory server, and how do you keep them accurate without a person checking each one? No rush.