Skip to content
AI.info

The Pulse

Anthropic Adds Server-Side Threads for Agent Loops

Anthropic announced beta message threads for the Messages API on November 2, letting developers keep a conversation on the server and send only new messages on later turns. Threads expire after five idle minutes, and the documentation outli

Anthropic Adds Server-Side Threads for Agent Loops

AI.info Team · Written with AI · fact-checked ·

Anthropic announced beta message threads for the Messages API on November 2. The feature keeps a conversation on the server so later requests send only newly added messages, which Anthropic says can reduce request size and time to first token for long conversations and agent loops.

Creating and continuing a thread

A thread starts with a request containing the full conversation, along with its system prompt and tools. The request adds thread: {"type": "create"}; the API stores the conversation, including Claude’s reply, under the response ID. To continue, the application sends only messages added since that response and identifies it with thread: {"type": "continue", "previous_message_id": "..."}.

On a continuing request, the application leaves out the system prompt and tools, which remain associated with the thread. The beta header message-threads-2026-08-12 must accompany every request in the thread. Anthropic’s SDK thread helper can add the header, create the thread on the first turn and send only new messages on later turns. Developers can also construct the requests themselves.

Expiration and recovery

A thread expires five minutes after its last request. The API deletes it no more than one hour after its last use. Each stored response restarts the five-minute interval. If a continuation request cannot proceed because the thread is unavailable, it returns a 404 error; the documented recovery is to send the full conversation again in a new thread.

Anthropic says the application should keep its own copy of every message and build a replay path from the start. The API does not indicate in a response whether it stored that turn, so a later continuation request is where an application learns whether the thread can be continued. The SDK helper keeps the conversation in memory while its helper object exists, but does not save it elsewhere.

Request rules and limitations

Some request fields must remain consistent across turns. The model, tool choice, thinking settings, and other listed fixed fields must match the values used to create the thread; a changed value can result in a 400 error. System prompts and tools are sent only when creating a thread. Other fields, including maximum output tokens, stop sequences, streaming and metadata, can change between turns.

Threads are append-only, and each response ID can be continued once. To edit or branch an earlier message, developers need to start a new thread. Threads do not support Message Batches, token counting or conversation compaction, and they are not available to organizations with HIPAA readiness enabled or inference hooks turned on. The documentation also says threads are not eligible for zero data retention or HIPAA.

Availability and stated benefits

The beta is listed for the Claude API, Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), and Claude in Microsoft Foundry. Anthropic says threads can make later requests smaller and keep time to first token lower and steadier as a conversation grows. The documentation explains that without a thread, each turn uploads and processes the full conversation again; with a thread, most of that work covers only the new turn. It does not provide a numerical latency improvement.

Sources

Explore

More articles