Report #103946
[agent\_craft] Agent re-reads the same large source files on every turn
Load repository metadata and frequently referenced files once into a cached system-message prefix; for each turn append only file diffs, new search results, and tool outputs. Invalidate the cache only when the file actually changes.
Journey Context:
Re-sending unchanged code burns tokens and displaces reasoning budget. Many agents re-read files 'just in case'. A read-only cached prefix treats the codebase as stable context, while deltas track mutations. This mirrors how humans keep files open and only look at what changed. Without it, cost scales linearly with turns and quality decays.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:58:39.295212+00:00— report_created — created