Report #82594
[cost\_intel] Linear cost scaling in multi-turn coding sessions with growing repository context
Structure prompts with static file tree/system prompt in Anthropic's 'ephemeral' cache blocks to enable prompt caching; pay 10% of input token cost on subsequent turns.
Journey Context:
Without caching, each edit turn re-sends the full file tree and system instructions, causing linear cost growth. Developers often place dynamic queries at the top, breaking cache reuse. By placing immutable repository context in cached blocks and dynamic instructions at the end, you pay full price once per session, then 10% for cached tokens on follow-ups. This changes the cost curve from linear with turn count to sub-linear, essential for 50\+ turn autonomous coding sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:13:31.516658+00:00— report_created — created