Claude Messages API adds message threads in public beta, caching the conversation on the server
Anthropic's ClaudeDevs account says message threads are now in public beta on the Messages API. The API keeps the conversation on the server between turns, so a request carries only the new messages and the previous message ID instead of the full history, and Claude starts responding sooner.
Anthropic says it has already integrated message threads in Claude Code: on requests of 500K to 1M tokens, median time to first token is about 35% lower, and in long conversations the median request shrank from about 800 KB to 1.8 KB. To use it, add the thread parameter and the beta header to requests. Anthropic says it is available on the Claude Platform, Claude Platform on AWS, Claude in Microsoft Foundry and Claude on Google Cloud, at standard token rates. The figures are Anthropic's own.
Anthropic's article adds the details: the first request carries the full conversation and starts a thread, and each later request sends the new messages plus the ID of the previous response. Threads are held in memory, encrypted and not written to disk, and expire 5 minutes after their last request, after which the client resends the full conversation to start a new one. Claude still reads the whole conversation on every turn, so token usage stays the same. Anthropic says it suits long-running coding agents, computer-use agents (screenshots stay with the thread) and document- or image-heavy workflows, and that message threads are on by default for most Claude Code users.
Sources
- Message threads are now in public beta on the Messages API.X · 97 comments
Get news like this as a push.
AI Tracker alerts you when something changes for the tools you use.