一键导入
continue-fix-volatile-msg
Continue inherits the Cline-family volatile-message cache bug. Same fix shape.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Continue inherits the Cline-family volatile-message cache bug. Same fix shape.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Aider uses 5min TTL by default and works around long pauses with keepalive pings. Wire up the 1h TTL beta instead.
Aider's --cache-prompts is off by default. Flip it on for supported models.
Stop Cline from burning a cache breakpoint on the volatile current user message every turn.
Cline OpenAI native provider sends no prompt_cache_key. Add a stable per-task key so cached_tokens stops being zero.
Cline's system prompt includes a timestamp that may be recomputed per request, invalidating the system-prompt cache.
Continue's prompt caching is opt-in via config and off by default. Flip the default to systemAndTools.
| name | continue-fix-volatile-msg |
| description | Continue inherits the Cline-family volatile-message cache bug. Same fix shape. |
| target_harness | Continue |
| target_repo | continuedev/continue |
| target_files | ["packages/openai-adapters/src/apis/Anthropic.ts","core/llm/llms/Bedrock.ts"] |
| target_commit | main (last push 2026-05-26) |
| estimated_savings | ~30% wasted cache write premium eliminated per turn |
packages/openai-adapters/src/apis/Anthropic.ts and
core/llm/llms/Bedrock.ts in continuedev/continue. The relevant
function is addCacheControlToLastTwoUserMessages (Anthropic) and
_addCachingToLastTwoUserMessages (Bedrock).
Same as cline-fix-volatile-msg
and roo-fix-volatile-msg:
Continue caches the last 2 USER messages, including the current
user turn which changes every request. Pays write premium for zero
reads on that breakpoint every turn.
Rename and rewire the function to target stable messages (the previous assistant turn) instead of user messages:
--- a/packages/openai-adapters/src/apis/Anthropic.ts
+++ b/packages/openai-adapters/src/apis/Anthropic.ts
@@
-function addCacheControlToLastTwoUserMessages(messages: Message[]) {
- const userIdxs = messages
- .map((m, i) => (m.role === "user" ? i : -1))
- .filter(i => i >= 0);
- const lastTwo = userIdxs.slice(-2);
- for (const idx of lastTwo) {
+function addCacheControlToLastStableMessage(messages: Message[]) {
+ // Cache the last STABLE message (not the volatile current user turn).
+ // Stable = the message before the user's in-flight request.
+ if (messages.length < 2) return;
+ const idx = messages.length - 2;
+ {
const m = messages[idx];
// ...existing logic to attach cache_control to last content block
}
}
Update the caller in _convertBody() to use the new name.
Same shape in core/llm/llms/Bedrock.ts — replace the
_addCachingToLastTwoUserMessages body with the
_addCachingToLastStableMessage logic, using cachePoint instead of
cache_control.
Same procedure as the Cline skill — see
cline-fix-volatile-msg/SKILL.md#verify.
Wire-level assertion is identical: turn-2
cache_creation_input_tokens should drop to ~0,
cache_read_input_tokens should cover the full prefix.
This is the third instance of the same copy-paste bug (Cline → Roo →
Continue). Apply this skill alongside
continue-enable-defaults
so users don't get the bug surfaced by the default-on change.
Full audit: audits/continue.md.