77.8% of Agent Runs Carry Stale File Views — Lessons From Building a Context-Refresh Layer

jabulari · reddit · 2026-09-28

After months on one agent-harness problem — tool results are snapshots but conversations treat them as permanent truth — the author measured 67k OpenHands trajectories and found 77.8% of runs carried at least one stale file view. He built a sidecar engine (freshctx, MIT, following the CORVUS paper) that rewrites outgoing requests: old reads become markers, current code moves to the end. Transferable lessons: rewrite only the sent copy; label every number shown to the model (a byte count misread as a line number caused loops); leave pointers when moving content; dynamic content at the end keeps cache prefixes stable but bills full price — removing stale views saved almost nothing; fail closed on mid-flight file changes; and byte-exact freshness (100% across 26k replays) didn't improve task outcomes when the model can re-read. A short script to measure staleness in your own transcripts may be the most useful takeaway.

Original post →

More from coding & agent

coding & agent channel →