Analysis of thousands of coding sessions: 40-89% of files agents read are never used
rseroter · x · 2026-10-27
Patrick John Kelly argues AI agents shouldn't keep every file they read in conversation history. Analyzing thousands of real coding sessions, he found 40%-89% of files an agent reads are never actually used or edited.
Key points:
- Most harnesses keep every message, tool call, and file read in context until compaction runs
- Without compaction, costs balloon and responses slow; but compaction loses details, and irrelevant content causes "context rot"
- File exploration is a major culprit: agents may read 10 candidate files and use only 1, leaving the rest in history
- He advocates better post-turn context pruning: after an exploration turn, purge file contents the agent didn't use
More from coding & agent
- Dev turns DJI Mavic into local AI security drone built with Opus 5.5 — alexcovo_eth · 2026-10-27
- Microsoft Research: ForkPilot cuts long-horizon agent compute by up to 59% — EliasEskin · 2026-10-27
- Cursor launches Agent SDK: agents as code with Markdown prompts and TypeScript tools — soleio · 2026-10-27
- Vibecheck, the 'usable formal methods' hackathon, sells out two floors in SF — spikedoanz · 2026-10-27
- How do you verify AI agent outputs beyond unit tests and LLM-as-judge? — Practical_Green5775 · 2026-10-27
- AI agents may soon become the only way to run code, not just write it — IgorCarron · 2026-10-27