Caching is all you need
Jul 29, 2026

Summary
This post details Hex's efforts to optimize AI spend by improving caching strategies. It introduces a cache visualization tool to identify cost drivers, discusses the limitations of average cache hit rates, and outlines three key fixes: improving default user experience with auto-approve and desktop notifications, structuring prompts to keep shared context warm across threads with automated review for regressions, migrating long-running subagents to faster models with time limits, and implementing a better cache route key strategy (bucket key) to reduce mid-run cache misses.