Anthropic Message Threads Cut Claude Code Latency by 35% on Long Sessions

Anthropic’s new message threads feature targets a familiar drag in long-running AI agent work: each API turn has required clients to resend the full conversation, including old tool calls and results. Threads let the server retain that history between requests, cutting repeated data uploads and, according to Anthropic, reducing median time to first token by about 35% on Claude Code requests with 500,000 to 1 million tokens.
The improvement is practical, but narrowly defined. Claude still processes the complete conversation on each turn, so message threads don’t reduce the number of tokens billed. They reduce the conversation payload the client must transmit and the API must validate and tokenize before generation begins. Developers looking for lower processing costs can pair threads with Anthropic’s prompt caching feature, which can reuse previously processed content at discounted token rates.
Less repeated traffic for long sessions
With the traditional Messages API pattern, an agent sends the accumulated conversation every time it asks Claude for another response. A coding agent may make hundreds of calls while reading files, editing code and invoking tools. Once its history reaches 500,000 tokens, each new request includes that existing context again, plus the latest messages. That repetition can add latency before Claude starts generating.
Message threads change what the client needs to send. The first request still contains the full history, along with system prompts and tool definitions. Later requests carry only new messages and a reference to the preceding response. Anthropic reconstructs the conversation on its servers and passes the full context to Claude.
“While each request is smaller with message threads, Claude still reads the full conversation on every turn, so token usage stays the same.”
That distinction matters when estimating the feature’s value. A smaller request can mean less repeated network traffic and less work preparing the incoming payload. It doesn’t mean a large conversation becomes cheaper for the model to process. As Anthropic puts it, “While each request is smaller with message threads, Claude still reads the full conversation on every turn, so token usage stays the same.”
The feature is available in public beta through the Messages API and is enabled by default for “most” Claude Code users, according to an Anthropic article published Monday. Its API availability also makes it relevant to developers building agents outside Claude Code, especially systems that repeatedly call tools or work with large collections of images and documents.
Where repeated uploads add up
Anthropic points to long coding sessions, computer-use agents that capture screenshots, and document-heavy applications as likely fits. The common feature is a growing conversation that contains large material already sent on earlier turns. Keeping that material server-side can substantially shrink the data uploaded on each follow-up request.
Guillaume Lebedel, co-founder and CTO of AI agent infrastructure company StackOne, illustrated the potential for computer-use agents in a LinkedIn post. His estimate assumes an agent sends one 150 KB screenshot at every step. By step 50, a conventional request would include about 7.5 MB of accumulated screenshots. With threads, that request would carry only the newest image, around 0.15 MB.
Across all 50 steps, Lebedel estimates the total screenshot upload would fall from roughly 191 MB to 7.5 MB, or about 25 times less. These are simulated figures, not results from a live API benchmark, so they show the possible scale of reduced uploads rather than a measured product outcome.
Lebedel expects computer-use agents may adopt threads before coding agents because screenshots make repeated requests especially heavy. “My bet — computer-use agents adopt it before coding agents do, since a screenshot per step is what makes the resend heavy, and most have it on by the end of December,” he wrote.
Connecting a thread to the API
Anthropic adds a thread parameter to the Messages API. A client starts a thread with thread={"type": "create"}, sending the complete initial conversation, system prompt and tool definitions. On later calls, it can use thread={"type": "continue", "previous_message_id": first.id}, with first.id set to the response ID from the first request. Follow-up calls then contain only new messages; the server retains the earlier context and original configuration.
Direct API users also need the beta header anthropic-beta set to message-threads-2026-08-12. In the Python SDK, developers can pass that value through betas=["message-threads-2026-08-12"].
Anthropic offers a thread helper in its SDK to handle the request bookkeeping. A Python client can be created with client = anthropic.Anthropic(), then a thread initialized through client.beta.messages.thread(). The helper accepts settings such as the model, maximum output tokens and initial system prompt. Calls to thread.send() create the thread on the first turn and continue it on later turns, while the helper supplies the beta header and keeps a local copy of the conversation.

Five-minute inactivity window
Threads expire after five minutes without activity. Some developers have criticized that window: one user on X observed, “Five minutes at the coffee machine and the thread expires.” Another user called the short cache expiry “almost useless.” That comment appears to refer to thread expiration, which is separate from prompt caching.
“Five minutes at the coffee machine and the thread expires.”
The timeout creates a pause penalty rather than a lost-session problem when clients preserve their conversation history. After a break long enough for the thread to expire, the SDK helper can resend that history and create a replacement thread. The first request after returning may take longer, but the agent can continue with its prior context. For continuously active agents, each successful request refreshes the five-minute window.
Developers managing API calls themselves need to detect expiration. Continuing a thread that is no longer available returns a 404 error; the client must then submit the full conversation again to establish a fresh thread.
Data handling and availability
Anthropic says thread contents are encrypted and held in server memory rather than written to persistent storage. Although inactivity expires a thread after five minutes, its contents may remain in memory for up to an hour after the last use. The feature isn’t eligible for zero data retention or HIPAA, and it doesn’t support some context-management functions, including on-demand compaction.
Message threads are in beta across all Claude models. They’re also available through Claude Platform on AWS, Claude in Microsoft Foundry and Anthropic-managed Claude Models on Google Cloud.
For teams running long agent sessions, the clearest near-term payoff is lower repeated upload volume and potentially faster response starts, especially when requests carry screenshots or other large artifacts. The trade-off is that model token usage remains tied to the full conversation, while pauses longer than five minutes can force a client to rebuild its thread. That makes thread retention and recovery part of the agent’s implementation, alongside prompt caching for teams seeking lower processing costs.