WHAT NEW IN X10.30 FRI

X 上的 AI 合集档案 · 22 个合集 · 61,305 条

jevVIDEO

Claude Code 提示缓存:一次选模型,别中途切

会话中途切模型、增删 MCP、随意 compact 都会让前缀缓存失效;把无需思考的微决策交给 Jev,就不必进入前缀。

delost
@thedelost12 天前收录原推发布于 2026.10.18
delost @thedelost原推发布于 2026.10.18
在 X 上打开原推

THIS IS A PURE F*CKING GOLDMINE Anthropic just shared one of the best tricks for Claude Code. The idea: every turn re-sends your whole history, and the only question is whether you pay full price for it again. The cache matches the start of your request, so one change anywhere in the prefix recomputes everything after it. You just start Claude Code like this: claude --model opus here's the split: → pick the model once, at the top, and never touch /model mid-task → every /model switch reads the entire history with zero cache hits → on Opus 5.5 changing effort keeps the cache, so the effort ladder is free → /advisor toggles keep it too, the advisor sits after the breakpoint three things quietly burn your prefix: → switching models in the middle of a task → connecting or removing an MCP server → compacting when you could have rewound instead Pick once. Append always. Rewind, don't compact. JEV engineering is the same move one layer down: the forks that need no thinker (which file, which tool, retry or stop) go to JEV in milliseconds and never enter the prefix at all, so the big models only see the ones that split the full tree > one model for the whole session, every switch starts a fresh cache > /rewind truncates back to a prefix that is already cached > /compact builds a new one, so save it for breaks between tasks > editing claude-md mid-session keeps the cache and also does not apply > subagentPromptCacheTtl 1h keeps subagent caches warm past five minutes > JEV routes micro-forks in milliseconds and never touches the prefix paste the tree and this prompt into Claude Code ↓ "Rebuild my Claude Code setup around this tree: 1. Add one rule to CLAUDE.md: pick the model at session start and never switch mid-task. 2. Set subagentPromptCacheTtl to 1h in my settings so subagent caches survive longer than five minutes. 3. Add a second rule: prefer /rewind over /compact, and only compact between tasks. 4. Route fast deterministic forks (tool choice, path selection, retries) through JEV. Show me every change as a diff first. No edits until I say go." ↳ http://code.claude.com/docs/en/prompt-caching save it, it'll come in handy.

这条是引用着另一条写的:x.com/hanakoxbt/status/2110067711363457244

x.com/thedelost/status/2111569977169858653采集于 2026.10.18 10:02