Measure what a coding agent forgets after compacting a long session

A Redditor had Claude Code compact an 850k-token session at three sizes and quiz each new session; it answered 56% right at 320k tokens and 26% at 840k, with exact details faring worst.

Done withClaude Code· Nov 24, 2026

What they did

u/DopBopDeeBeep had a long Claude Code session of about 850k tokens on an iOS app and some spare weekly usage. They asked Claude to run an experiment on itself: compact the conversation at three points, about 320k, 570k and 840k tokens, then quiz the fresh session after each compaction about the earlier work. The quiz had 31 questions: 9 on decisions and their reasons, 17 on specific details, and 5 on what the user had asked and which tasks were still open. Claude also produced a visual of the results.

How it went

The compacted session answered 56% of questions correctly at about 320k tokens, 35% at 570k and 26% at 840k. Specific details suffered most: at 840k only 2 of 17 detail questions were right. General direction and decisions held up better, especially below about 350k. The poster calls it one session, not a thorough study.

Worth knowing

A top commenter pointed out that compaction deletes nothing: the full transcript stays on disk and the summary tells the agent where it is. The poster then confirmed the quizzed sessions never opened it, so the scores measure the summary alone. Compact accepts focus text, and commenters keep exact ids and open decisions in files instead of relying on the summary.

Try it

With Claude Code· 4 parts to fill in

Run an experiment on this session to measure what compaction loses. First write [number] quiz questions with answers about this session, split between decisions and why they were made, exact details like [file paths, ports and error strings], and open tasks. Save them to [a file]. Then compact at [token sizes] and, after each compaction, answer the quiz from the summary alone, then again after reading the saved transcript. Score both runs per question type and report a table. Do not change any project files while doing this; stop after the report.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related