←新闻详情

Lydia Hallie更新于 10月16日 11:22

Claude Code auto-compact 机制澄清:967K 触发与 /autocompact 400k

Just to avoid some confusion: auto-compact does summarize. When it runs, your whole conversation is replaced by a short summary. It doesn't keep the last 1M tok

AI 导读

Claude Code 的 auto-compact 确实会做摘要,运行时整段对话被替换为简短摘要,并不会保留最近 1M tokens。约 967K 的触发阈值只出现在 1M 模型上,压缩本身只是一次请求,读取的 token 量大致等于上一条消息,缓存仍热时多为缓存读取。等待到 967K 意味着此前每条消息都携带完整对话、持续计入用量;/autocompact 400k 可改为在 400K 时摘要。

引用

Lxyv

@wholyv

holy fuck. so auto compact basically loads last 1M tokens into context by default on claude? and here i thought they were summarising and reducing the context loads. no wonder people used to burn anywhere from 2%-15% 5h limits simply for auto compacting their sessions.

查看原帖

正文

当前显示原文,中文全文译文尚未就绪。

Just to avoid some confusion: auto-compact does summarize. When it runs, your whole conversation is replaced by a short summary. It doesn't keep the last 1M tokens around.

The ~967K is only when it runs on 1M models. Compacting itself is just one request that reads about as many tokens as the message you sent right before it, and it's mostly cache reads if your cache is still warm.

What @rohit3a found is that waiting until 967K means every message before that point uses a lot of tokens, because each one includes your whole conversation so far. Most of it is read from the cache, which is much cheaper (so this is usually fine as long as your cache is warm), but it still counts toward your usage and adds up as your conversation grows.

/autocompact 400k makes it summarize at 400K instead, so your messages never get that big.

来源

Lydia Hallie