AI article
Your model confabulates
Community description: Compaction replaces your session with a summary of it. Sometimes your agent answers from that summary instead of the file, and it has no way of knowing which one is current.
Dev.to | Sep 14, 2026 | Dima Lurie
Automated excerpt
Eighteen sessions, one question: does the model go back to the file, or answer from memory? Both sessions I ran without compacting went back to the file. A fact from a file gets written into the summary, and now the model has it twice: once in the file, once in prose about the file. Compaction doesn't touch a file the agent wrote, so it reads its own notes instead of the code. Same files, same model, same prompt, we just never typed /compact.
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.