Build1 publisher2 min readPublished
Seven of sixteen compacted agent sessions answered from the summary instead of re-reading the file
Compaction leaves behind a summary that can outvote the file it summarised. A small hands-on trial on configuration files found the model serving stale values out of that summary in nearly half of the compacted runs.
The Engineer · Build desk

What happened
- The test read a set of configuration files into the model, compacted the session, changed the values in the files, then asked for the values back without ever telling the model to re-read anything.
- Seven of the sixteen compacted sessions answered from memory, giving back values that the files no longer held.
- Both of the sessions run without compaction went back to the file for the answer.
- Every wrong answer came back with zero or one tool call behind it and every right answer with four or more, with no overlap between the two groups.
- An earlier attempt with six configuration files reproduced nothing, because the model re-read all six and even noticed that the mtime had changed.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint Session length becomes a correctness variable: once a value is lifted into a summary, the agent can serve it without paying for a read, and the output does not say which copy it came from.
- decision Teams following the compact-soon-and-often guideline circulating in AI dev chats now have to price staleness against cache savings, and pick a compaction cadence on purpose.
- exposure Agents pointed at Slack threads, email chains, feedback queues and ticket status are the exposed case, because those sources move on their own and re-checking them is not one tool call.
- capability Counting tool calls either side of a compaction boundary gives an operator a way to flag suspect answers in transcripts already on disk, before anyone diffs the file.
The hypothesis came out of repeated annoyance. After compacting, the author of the dev.to post reports, the model would state facts about code that were no longer true, and once corrected would go and read the file and say "ohh yes, I was wrong, the code states as you say" [18].
Compaction replaces the session with a summary of it, and a value the summary kept then exists twice: once in the file, once in prose about the file [6]. That prose copy is a second source of truth for something that can still change underneath it [1]. Re-reading costs a tool call. Quoting the summary costs nothing.
Two other paths put a stale value in front of the model. Compaction does not touch a file the agent itself wrote, so an agent that took notes reads its own notes instead of the code [7]. Then there is the handoff at the cut: "Claude Code returns your most recent files after compacting, and what you get is a photograph taken at the moment of the cut", the author wrote [8].
The sample is small. Eighteen sessions in total [4], sixteen of them compacted, which leaves a control arm of two [1]. The author states the limit before anyone else can: "This is mechanism validation, not a statistical study" [5]. Opus did better than Fable, and the behaviour turned up in both [9].
For that failure rate to transfer to another workload, re-reading has to be cheap and the agent has to skip it anyway. The trial built exactly that situation. Configuration files were chosen because code is the friendly case, sitting still in a file with re-reading one tool call away [13]. Where the source changes on its own and re-checking costs more than one file read, I would expect the skip to happen at least as often, and the post does not measure that case.
The savings side of the argument is asserted and untested. Compaction does clear the bloat of a long session, the exploratory scripts and the files read once and never needed again, and it points attention back at the current activity [17]. On tokens, the author wrote that "session pricing is dominated by cache reads in long sessions" and that "compacting often may result in x2 and even more savings", then added: "or at least that is the argument, I haven't measured it myself" [16].
What to watch
- A larger run under the same protocol, across more models, would show whether 7 of 16 is a rate or an artifact of two models and one file set.
- Whether coding agents start stamping compacted summaries and post-compaction file handoffs with a read time or an mtime check.
- An actual measurement of the cache-read savings the post reports only as an argument for compacting often.