You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(roadmap): a stage return reads the Claude prompt cache #7922
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard workscope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/infraType infra: the build, CI, images or clustervalue/highValue High: the delivery of the item matters much
On a Claude gateway group, each gate return of a stage plan writes the whole request into the prompt cache again.
bound_previous sends the request with previous and problem as one user message. Anthropic reuses a cached prefix only up to a cache break. The only breaks are the system message and the last message, so the changed user message misses the cache after the tools and the system text.
Evidence
A plan-only stage run of #5041 on claude-sonnet-5-5 on 2026-11-30 made 9 plan runs. The first call of each of the 8 returns read 17,268 tokens from the cache and wrote about 52,300. These 8 writes cost about 1.07 USD of the 1.97 USD of the run. A call that read the cache cost 0.01 to 0.06 USD.
DeepSeek reuses any token prefix, so its returns hit the cache.
Change
Send the plan request as two text parts with a cache break between them: the part that each return repeats, and the rest. The joined text stays the same, so the model reads the same request.
The model of a Claude group turns the cache break into cache_control through the documented hook of pydantic-ai. Other models drop the break.
Done when
A live second request that differs only after the break reads the repeated part from the cache.
Alternatives check of 2026-11-30: not-applicable.
Class: perf, no model call.
Tool: none found.
Related: chore(roadmap): measure the cache share of a stage plan run #4583, which asks for a different change. Both deal with the stage plan cache, but #4583 measures the cache share while this candidate changes the request layout so the stable prefix hits the cache.
effort/lowEffort Low: little workpriority/p2-mediumPriority P2: standard workscope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/infraType infra: the build, CI, images or clustervalue/highValue High: the delivery of the item matters much
Activity
dan-petty commentedon Nov 30, 2026
Both deal with the stage plan cache, but #4583 measures the cache share while this candidate changes the request layout so the stable prefix hits the cache.devops-cli-service commentedon Nov 30, 2026
Released in v0.265.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.265.0
devops-cli-service commentedon Nov 30, 2026
Live since 2026-11-30 22:54 UTC