离开前趁缓存还在compact
Compact before the cache expires
要点
- Anthropic 的建议:提示缓存约一小时过期,离开前先 /compact。
- 缓存还在时摘要更便宜,过期后再总结等于重付写入。
- 订阅侧默认可能是 1 小时,API 常是 5 分钟,除非打开 1 小时缓存。
- 靠人记很容易忘,真正省钱要把 compact 做成离开前的固定步骤。
原帖开头
Anthropic just published HOW to run Claude Code without burning tokens. Your prompt cache expires after an hour. Run /compact BEFORE you step away, while it is still cached. Summarizing later costs more.








