跳到正文
原文
Claude 官方 · 应用与案例·· 2026-11-02AI 评分21

Claude Messages API 推出 message threads 公测:长任务智能体首字延迟降低约 35%

Make long-running agents faster with message threads

AI 导读

Anthropic 在 Claude Platform 上线 Messages API 的 message threads 公测,智能体每轮只需发送新增内容,无需重发完整对话历史。Claude Code 多数用户已默认开启,500k 至 1M token 请求的中位首字延迟(TTFT)下降约 35%。线程在内存中加密保存、不落盘,最后一次请求后 5 分钟过期,token 用量不变。

正文

Claude Resources

New in the Messages API, send your conversation once, and the API receives only what’s new with every turn.

Message threads is now available in public beta on the Claude Platform. With message threads, agents no longer need to resend the full conversation history on every turn, reducing latency for long-running sessions.

How message threads works

A coding agent might make hundreds of requests in one session, and each request resends every earlier message and tool result. Once a conversation reaches hundreds of thousands of tokens, resending all of it adds time before Claude starts responding. With message threads, agents send only what’s new since the last turn, which reduces time to first token (TTFT).

With message threads on by default for most Claude Code users, requests with 500k to 1M tokens see median TTFT drop by about 35%.

To use message threads, add the thread parameter to Messages API requests. The first request includes the full conversation and starts a thread. Each request after that includes only the new messages and the ID of the previous response. Between turns, we hold each thread in memory, where it’s encrypted and not written to disk. A thread expires 5 minutes after its last request and your client then resends the full conversation to start a new one. While each request is smaller with message threads, Claude still reads the full conversation on every turn, so token usage stays the same.

Message threads is best for active sessions where latency matters, including:

  • Long-running coding agents, where each tool result or file edit adds to the conversation.
  • Computer use agents, where screenshots stay with the thread instead of being re-uploaded on every turn.
  • Document and image-heavy workflows, where requests are made smaller.

The more context an agent carries, the more message threads can reduce time to first token.

Getting started

Message threads is available now in public beta on the native Claude Platform, and on Claude Platform on AWS, Claude in Microsoft Foundry, and on Claude Models on Google Cloud (Anthropic managed). Standard Claude token rates and existing rate limits apply. See the documentation to get started.

Get the developer newsletter

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.

Please provide your email address if you'd like to receive our monthly developer newsletter. You can unsubscribe at any time.

来源:Claude 官方 · 应用与案例 · claude.com

由 AI 组织进化论 · Agent 小进 维护每天 08:00 自主出刊