Claude Message Threads Beta: How to Stop Resending Full Conversations in the Messages API
What Are Message Threads?
On November 2, 2026, Anthropic announced message threads in public beta for the Messages API. The idea is simple. Today, every turn of an agent loop resends the whole conversation: system prompt, tools, every message, every screenshot. With a thread, you send the full conversation once, and after that you send only the new messages plus the ID of Claude's last response.
The message threads docs describe it as keeping a conversation "on the server for a short time, so each turn sends only the new messages instead of the full history."
| Status | Public beta, all Claude models |
| Beta header | message-threads-2026-08-12 (on every request in the thread) |
| Request parameter | thread |
| Platforms | Claude API, Claude Platform on AWS, Claude in Microsoft Foundry, Claude Models on Google Cloud (Anthropic managed) |
| Pricing and rate limits | Unchanged |
| ZDR / HIPAA eligible | No |
What It Saves (and What It Doesn't)
Threads cut latency, not tokens. Claude still reads the whole conversation on every turn, so token usage is the same. What shrinks is the request you upload, which matters when a long coding or computer-use session has grown to hundreds of thousands of tokens.
Anthropic's one number: with threads on by default for most Claude Code users, requests between 500k and 1M tokens saw median time to first token drop by about 35%. That is Anthropic's own measurement on its own product; I have not seen independent numbers yet.
The announcement lists three good fits:
- Long-running coding agents
- Computer use agents, where screenshots stay with the thread
- Document- and image-heavy workflows
If your app makes short, two- or three-turn calls, you probably won't notice a difference.
How the Thread Parameter Works
There are two request shapes.
Create. Send the full conversation with system and tools, plus "thread": {"type": "create"}. The response id identifies the thread.
Continue. Send only the new messages, plus "thread": {"type": "continue", "previous_message_id": "<previous id>"}. Leave out system and tools. Use each new response id for the next turn.
The docs' Python example, shortened:
import anthropic
client = anthropic.Anthropic()
# Turn 1: create the thread
first = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
cache_control={"type": "ephemeral"},
system="You are a support agent for Acme. Keep replies short.",
messages=[{"role": "user", "content": "Hi! I have a question about an order."}],
thread={"type": "create"},
betas=["message-threads-2026-08-12"],
)
# Turn 2: continue with only the new message
second = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
cache_control={"type": "ephemeral"},
messages=[{"role": "user", "content": "How long does standard shipping usually take?"}],
thread={"type": "continue", "previous_message_id": first.id},
betas=["message-threads-2026-08-12"],
)
The SDK also has a helper, client.beta.messages.thread(...) with thread.send(...), that handles create, continue, replays and beta headers for you. If you are adding threads to an existing loop, start with the helper.
The Rules Your Agent Loop Must Follow
Threads are a cache, not storage. Most of the work in adopting them is handling the cases where the cache is gone.
Threads expire after 5 minutes
A thread expires 5 minutes after its last request, and each stored response restarts the timer. The API deletes a thread no more than an hour after its last use. There is no API to list, read or delete a thread.
When a continue request returns 404 with thread_not_found, replay the full conversation in a new create request and continue from that response's id. That means you must keep your own copy of every message. The docs say it plainly: responses don't confirm whether a turn was stored, and you only find out on the next continue.
Some fields are locked for the life of a thread
| Group | Fields | Rule |
|---|---|---|
| Create-only | system, tools |
Sending either on a continue request, even as null, returns 400 |
| Fixed | model, tool_choice, thinking, mcp_servers, context_management, output_config, container skills, top-level cache_control, the anthropic-beta set |
Must match the create request, or you get thread_fingerprint_mismatch |
| Free | max_tokens, stop_sequences, stream, metadata, service_tier and others |
Can change per turn |
So if your agent adds a tool mid-session or switches models for a hard step, that is a new thread.
Each response can be continued once
Always continue from the latest id. To edit history or branch, start a new thread. Also:
- On
pause_turn, continue with"messages": []. - After
stop_reason: "refusal", don't continue. Start a new thread without the refused turn. - If you use
fallbacks, send them on every request in the thread or none. A response written by a fallback model is not stored, so you must replay. - To compact a long session, start a new thread with a summary.
Prompt caching is not automatic
Threads don't cache on their own. Send a top-level cache_control on every request, as in the example above. A thread request can carry at most 4 cache_control breakpoints, the top-level one counts, and breakpoints on system and tools from the create request count again on every continue.
Streaming
The id arrives in message_start, but only continue after message_stop. If a stream drops before that, resend the same continue request. If it comes back thread_already_continued or thread_continue_in_flight, replay.
Errors to Handle
| Status | error_code |
What to do |
|---|---|---|
| 404 | thread_not_found |
Replay the full conversation in a create request |
| 400 | thread_fingerprint_mismatch |
Keep fixed fields unchanged, or start a new thread |
| 400 | thread_already_continued |
Continue from the latest id, or replay |
| 400 | thread_continue_in_flight |
Wait for the earlier request, or replay |
| 400 | thread_unsupported_request |
Remove the unsupported feature, or send without thread |
These errors are returned before the model runs, so they cost no tokens. A replay fallback is cheap to build and cheap to trigger.
What Doesn't Work With Threads
- Message Batches
- Token counting
- Compaction, including compaction on demand
- Context editing, except
clear_thinking_20251015withkeep: "all" - Organizations with HIPAA readiness enabled
- Organizations with Inference hooks turned on
Privacy
Threads are held in memory, encrypted under a server-managed key, and never written to durable storage. A thread holds the conversation, system, tools and a fingerprint of the fixed fields. But threads are not eligible for zero data retention. If your organization relies on ZDR, keep threads off.
Should You Turn It On?
My take: yes, if you run long agent sessions and time to first token is a complaint. Wrap it behind a flag, keep your existing full-history path as the replay path, and log how often you hit thread_not_found. If users often pause for more than five minutes between turns, you will replay a lot and gain less.
Skip it for now if you need ZDR or HIPAA, rely on Batches, or depend on compaction or context editing.
