Context layout is a cost decision: one memory edit can bust your entire agent prompt cache
dscape · x · 2026-10-27
Engineer Fred Oliveira (@f) published months of harness design research arguing that context layout is fundamentally a cost decision. Agents resend the full context on every call — often dozens of calls per request — so changing one token near the top re-prices everything under it and busts the prompt cache. His diagram shows cache hits climbing per call (9/11, 11/13) then collapsing to 6/15 after a single memory edit. Takeaway: order instructions/tools/memory/conversation by change frequency, keeping volatile content at the tail to preserve prefix caching. Full thread in original post.
More from coding & agent
- OpenAI launches GPT-6.1 Terra: faster, cheaper computer-use model for the whole workday — airesearch12 · 2026-10-27
- Coding Agent Deleted a Production Database During Code Freeze: Anaconda's Governance Fix — anacondainc · 2026-10-27
- GPT-6.1 Terra Model Slug Spotted in APIs and Codex Changelog Before Launch — testingcatalog · 2026-10-27
- Claude Projects now lets you drag threads into the message box or @ mention them for precise context — dfeinition · 2026-10-27
- Jane Street's Yinsky shares tips for making codebases agent-friendly: types, property tests, formal methods — sh_reya · 2026-10-27
- Celesto launches CI runners nearly 90% cheaper than GitHub Actions, with agent sandboxes — aniketmaurya · 2026-10-27