Original Reddit post

Worth knowing if you run long Claude Code sessions or build on the Messages API. The problem: an agent resends the entire conversation at every step, so once a session reaches hundreds of thousands of tokens, each turn waits longer before Claude starts responding. The fix, now in public beta: add a thread parameter. The first request sends the full conversation and opens a thread; after that, each request sends only the new messages plus the previous response ID. Anthropic holds the thread in memory between turns, encrypted and not written to disk, and it expires 5 minutes after the last request - then the client resends the full conversation and starts a new one. Two things to keep straight: It’s a latency change, not a cost change. Claude still reads the full conversation every turn, so token usage and pricing stay the same. Anthropic reports median time-to-first-token drops about 35% on requests in the 500k-1M token range (their number, on their measurement), and says the more context an agent carries, the more threads can reduce time to first token. It’s already on by default for most Claude Code users. Available in public beta on the Claude Platform, Claude Platform on AWS, Claude in Microsoft Foundry, and Claude Models on Google Cloud (Anthropic managed). The design choice I find interesting: server-side conversation state, but only for five minutes and never on disk. That’s a small, deliberate amount of state - curious whether people building long-running agents treat the 5-minute expiry as a real constraint or a non-issue. Sources in the comments. submitted by /u/shoumikgoswami

Originally posted by u/shoumikgoswami on r/ClaudeCode