Claude API message threads (beta): keep the conversation server-side, send only new turns
What is it?
Message threads let the Messages API hold a conversation on the server for a short while. Your first request looks the same as today, with the full conversation, system prompt and tools, plus a thread parameter set to create. After that you send only the new messages and the previous response id with continue, and the API rebuilds the conversation before calling the model. A thread expires 5 minutes after its last request and is deleted within an hour. You need the message-threads-2026-08-12 beta header, though the SDK's thread helper adds it and handles replays for you.
thread = client.beta.messages.thread(model="claude-opus-5-5", max_tokens=1024)
thread.send({"role": "user", "content": "Hi!"})Why does it matter?
In a long agent loop, every turn re-uploads the whole conversation, and the API validates and tokenizes all of it again. Anthropic says threads cut that work down to the new turn, so time to first token stays lower and steadier as the conversation grows. Threads are best-effort, though: a continue call can return a 404 at any time. Your app still has to keep its own copy of the conversation and a path to resend it in full.
Maturity
BetaIt's a beta feature behind a beta header. It works on the Claude API, Claude Platform on AWS, Claude Models on Google Cloud, and Microsoft Foundry.
How to track it
- GA: watch the release notes for a version that drops the beta header.
- Real numbers: look for developers measuring how much time to first token actually drops in long agent loops.
- Retention: check the docs for changes to the 5-minute expiry, the 1-hour deletion window, or how threads work with prompt caching.