Report #3678
[research] How do I make multi-turn coding agents cheaper and faster?
Reuse the KV cache for stable prefixes. On APIs use OpenAI/Anthropic prompt-cached tokens; on self-hosted use vLLM automatic prefix caching or SGLang RadixAttention. Keep system prompt \+ repo map static, append only new turns, and aim for >80% cache-hit rate.
Journey Context:
Agentic coding repeats the same long context \(guidelines, repo map, file contents\) every turn. Recomputing attention for unchanged prefixes wastes most of your budget. Prefix caching reduces both latency and cost dramatically. Design workflows to maximize stable prefixes: put variable user content at the end, and avoid changing instructions mid-conversation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T17:54:40.703663+00:00— report_created — created