Anthropic 推出 Message Threads 公测:长对话 Agent 每轮只发增量,首 token 延迟降约 35%
Anthropic 在 Claude Platform 上线 Message Threads 公测。过去 Messages API 每次请求都要重发完整对话历史;开启线程后,Agent 只需发送上一轮之后的新消息。Anthropic 称,多数 Claude Code 用户已默认开启,50 万至 100 万 token 的请求首 token 延迟(TTFT)中位数下降约 35%,token 用量和价格不变。

用法上,首个请求照常发送完整对话、system 和 tools,并加上 thread 参数创建线程;之后每轮只发新消息和上一条响应的 id,由 API 在服务端拼回完整对话。按文档,请求需带 message-threads-2026-08-12 测试版请求头;system 和 tools 只能在创建时发送,模型等固定字段每轮必须一致,否则返回 400 错误。
线程只是短期保存:Anthropic 称线程在内存中加密保存、不写入磁盘,最后一次请求 5 分钟后过期,文档称最迟在最后一次使用后 1 小时内删除。线程失效时继续请求会返回 404,需要重新发送完整对话再建线程,因此文档建议应用自己保留完整对话副本,SDK 的线程助手可自动完成这一步。
由于 Claude 每轮仍会读取完整对话,token 用量不变,按标准 token 价格和现有速率限制计费。Anthropic 称收益最大的是长时运行的编码 Agent、截图随线程保留的计算机使用 Agent,以及文档和图像密集的流程。该功能已在原生 Claude Platform、Claude Platform on AWS、Microsoft Foundry 中的 Claude 和 Google Cloud 上由 Anthropic 托管的 Claude 模型中提供。
来源
- Make long-running agents faster with message threads — Anthropic(Claude)
- Message threads — Anthropic(Claude Platform 文档)
- Anthropic’s Message Threads cut time to first token by 35 percent for long conversations — The Decoder