When Claude Fable 5.1 shipped on September 1, 2026, the third of its breaking changes was a rule about conversation history: each thinking block the model produces is valid only against the system prompt, the tools array and every message that preceded it. Send the block back after any of those changed and, where the check is enforced, the API returns a 400: “Invalid `signature` in `thinking` block. The block is bound to a different conversation.”
That rule collides with how agent frameworks keep long sessions inside a context window. Trimming the oldest turns, deleting old tool results, summarising early history behind a kept tail of recent turns, and refreshing the system prompt each request are the standard tools of the trade, and every one of them changes the prefix. Our launch-day post listed the change; this census applies it framework by framework, using each project’s current documentation as the source, so a team can find its own row rather than reading the migration guide against its own code base at 2am.
- 01Six of ten frameworks shorten history in a way the check rejects.LangChain/LangGraph, Vercel AI SDK, OpenClaw, Mastra, Semantic Kernel and Agno all trim or summarise on the client by default or in their documented path; Pydantic AI’s documented shape is safe but its processors can be misused. Anthropic’s own SDKs and Claude Code are exempt because they keep the prefix.
- 02The dangerous shape is the popular one: keep recent turns behind a summary.Anthropic names three client-side compaction shapes. Replacing the whole history with one summary is safe. Keeping a verbatim tail, or swapping a summary in later, invalidates every thinking block in the tail unless those blocks are stripped or drop_block is set.
- 03Framework authors will not see it; their users on new keys will.The check is enforced for accounts created on or after August 31, 2026, 00:00 UTC, and recorded but not enforced for older ones. A maintainer testing on a year-old key gets no 400. Anthropic’s advice to tool authors is to set prefix_mismatch_behavior explicitly so you see what new users see.
- 04The fixes are the same ones that keep the prompt cache warm.Server-side compaction and context editing do not count as edits. Mid-conversation system messages replace rebuilding system or tools. Every fix in the table also preserves prompt-cache hits that an edited history would lose.
01 — The ruleWhat the check compares.
Anthropic’s preserved-thinking guide states three conditions for a thinking block to be accepted on a later request. The model must be the same or newer, which is the one-way binding our downgrade post covered. Nothing before the block may have changed: the top-level system prompt, the set of tools, and every message before it. And the chain of earlier thinking blocks must be unbroken; each block records the one before it, so removing a block from the middle invalidates every block after it, while removing blocks from the front is allowed.
The migration guide then lists the patterns that fail. Editing, reordering or removing earlier turns, including deleting old tool results and snipping turns from the middle. Client-side compaction that keeps recent turns and their thinking blocks verbatim behind a summary, including background compaction that swaps the summary in a few turns later. Injecting content you do not persist, such as a per-turn reminder appended after tool results and removed next request. Rebuilding the system prompt or the tools array between requests, for example to update the date or add a tool. And an image or document URL that serves different bytes later. The patterns that keep working are append-only histories, removing thinking blocks oldest-first, changing request parameters outside system, tools and messages, and server-side compaction or context editing, which “don’t count as edits, because the check compares the conversation as you sent it.”
Claude Mythos 5.1, the same model with looser safeguards, does not run the conversation check at all; edits restart its prompt cache but do not invalidate its blocks. And Anthropic states that Claude Code, claude.ai, Claude Managed Agents and the Claude Agent SDK already keep the prefix intact, so the check applies only to code that builds the messages array itself.
02 — The datasetThe framework census.
Each row below records the history-shortening mechanism a framework documents, the shape it produces in Anthropic’s terms, whether that shape trips the check, and the fix. “Breaks” is a reading of the documented mechanism against Anthropic’s stated rules, not an observed failure: we did not run each framework against the API, and a framework may have shipped a Claude-specific path since its docs were read on September 3, 2026.
| Framework | Documented mechanism | Shape | Against the check | Fix |
|---|---|---|---|---|
| Hand-rolled loop (the baseline) | Whatever the code does: sliding windows, deleting old tool results, refreshing the date in the system prompt, adding a tool mid-session | Any edit before a thinking block | Breaks if it edits; fine if append-only | Run the three-step check in Anthropic’s guide; freeze system and tools; move changes to mid-conversation system messages |
| LangChain / LangGraph | trim_messages middleware and RemoveMessage / REMOVE_ALL_MESSAGES to cut oldest turns; delete_messages; SummarizationMiddleware replaces earlier messages with a summary | Front trim and keep-tail summary | Breaks on the kept tail | Strip thinking blocks from turns kept behind the summary, or send drop_block; prefer Anthropic server-side compaction |
| Vercel AI SDK | prepareStep returns a new messages array that becomes the base for later steps; pruneMessages removes selected messages; Anthropic provider sends reasoning back by default (sendReasoning: true) | Arbitrary client-side rewrite | Breaks if pruned mid-history | Prune whole thinking blocks oldest-first only, or replace the whole history with one summary; set drop_block in production |
| OpenClaw | Client-side compaction keeps a recent tail verbatim (keepRecentTokens, default 20,000) behind a summary; auto-compaction on context pressure; can also replay a provider-returned compacted window | Keep-tail compaction | Breaks on the kept tail | Strip thinking from the retained tail or set drop_block; use the provider-side compacted window where the provider offers one |
| Mastra | Memory processors (TokenLimiter, ToolCallFilter) filter and trim messages; Observational Memory replaces raw history with an observation log carried in the system message | Front trim; system prompt rewritten between requests | Breaks on both paths | Carry observations as an appended mid-conversation system message rather than editing system; trim thinking blocks oldest-first |
| Pydantic AI | ProcessHistory history processors summarise or filter messages before each request (the docs’ example returns a summary plus the last message); client-supplied CompactionParts are kept | Simple compaction or full filter | Fine if the summary replaces everything; breaks if the tail keeps thinking | Use the documented summary-plus-last-message shape, which carries no thinking, or server-side compaction blocks |
| Semantic Kernel | ChatHistoryTruncationReducer drops oldest messages; ChatHistorySummarizationReducer summarises removed messages and adds the summary back as one message | Front trim and keep-tail summary | Breaks on the kept tail | Strip thinking from retained messages after a reduce, or set drop_block |
| Agno | add_history_to_context with num_history_runs / num_history_messages caps: earlier runs fall out of the window by count | Front trim by count | Breaks when the window slides | Keep the window fixed for a session, or drop thinking blocks oldest-first before the cut |
| OpenAI Agents SDK | OpenAIResponsesCompactionSession calls responses.compact on OpenAI’s server; session.pop_item removes items client-side | Server-side on OpenAI; client edits via pop_item | Not applicable to Claude blocks unless routed through a third-party model adapter | If routing Claude through it, treat pop_item as a history edit |
| Claude Agent SDK, Claude Code, Managed Agents | Anthropic-managed history; the migration guide states these already keep the prefix intact | Append-only with server-side compaction | Fine | None required |
One framework is missing on purpose. CrewAI’s current memory documentation describes a unified memory store that saves and retrieves facts with an LLM; it does not document how the crew loop trims or rewrites the message array sent to the model, so we could not classify it from the docs and have not guessed. It will get a row when the mechanism is documented or when we have run it. The same census shape we used for redirect validation on fetch tools in August applies here: the row is only as good as the source it names.
03 — The mechanicsThree compaction shapes.
The migration guide’s most useful paragraph for framework authors is the one that sorts client-side compaction into three shapes and says which survive. It is worth reading in the framework’s own terms, because most of the rows above are one of these three.
Simple compaction
The whole history becomes one summary message plus the new user turn, and nothing else is replayed. No thinking blocks are carried over, so nothing fails. Anthropic recommends this shape and says Claude models are trained on long-horizon tasks with it and that it performs comparably to more elaborate schemes for most workloads. Pydantic AI’s documented example is this shape.
Keep-tail compaction
The most common framework design: LangGraph’s summarisation, OpenClaw’s keepRecentTokens tail, Semantic Kernel’s summarisation reducer. The retained turns carry thinking produced against the full history, which now sits behind a summary, so every block in the tail fails. Fix: strip thinking and redacted_thinking from the kept turns (text and tool calls can stay), or set prefix_mismatch_behavior to drop_block.
Background compaction
Every turn produced between building the summary and swapping it in carries thinking that predates the swap. Anthropic’s instruction is to send drop_block on every request still carrying pre-swap blocks, or to strip them using the input_transformations list on the first post-swap response, or to compact synchronously.
One pattern has no client-side fix at all: snipping individual turns out of the middle of the transcript, which invalidates every later block whatever else you do. Anthropic’s alternatives are a mid-conversation system message for the instruction change you were making, or server-side context editing for selective removal. Both keep earlier turns byte-identical, which is also what keeps the prompt cache warm, and the guide is explicit that an integration that invalidates prior thinking on every request “restarts the prompt cache each time, which can raise cost per task.” Our cache-first agent architecture post arrived at the same append-only design from the cost side.
04 — EnforcementWho sees the error, and when.
The check is enforced for API accounts created on or after August 31, 2026, 00:00 UTC, on the Claude API and on cloud platforms alike. For older accounts the API records the mismatch but takes no action unless the request sets thinking.block_binding.prefix_mismatch_behavior, which opts into enforcement. Anthropic says it plans to enforce the check for every account on future models. The consequence for framework maintainers is stated plainly in the guide: “your key is probably on an older account, and your users on new ones hit the check before you do.”
Two details change how you handle the failure. The error is permanent for that request body, so a retry loop does not clear it; the options are to strip the thinking blocks from the history and retry once, or to send the thinking-binding-controls-2026-08-01 beta header with prefix_mismatch_behavior set to drop_block, which drops the mismatched block and every block after it, succeeds, and reports each drop in an input_transformations array with reason prefix_binding_mismatch. Dropped blocks are not billed. The same array reports model_binding_mismatch after a model switch, which is a different event and not a bug in your code. The token-counting endpoint runs the same check.
05 — PracticeHow to test your own loop.
Anthropic’s three-step check works from any account and is the right test whether you maintain a framework or merely use one. First, capture the exact request bodies your integration sends over a few normal turns, including a compaction or a tool change if the product does those, and for each consecutive pair compare system, tools and the shared prefix of messages; they should be byte-identical up to the newly appended turns. Second, run a multi-turn session against claude-fable-5-1 with the beta header and drop_block set, logging input_transformations on every response; an empty array on every turn means the history is intact, and a prefix_binding_mismatch entry names the path of the block whose prefix changed. Third, pick a production setting: leave the default error if a mismatch can only mean a bug, or set drop_block and monitor the array. In CI, Anthropic suggests error, so an edit fails the run.
For teams that use a framework rather than write one, the practical order is to find your row above, run step two against your actual traffic, and apply the row’s fix or move compaction to the server. Our AI transformation practice runs this check as part of any Fable 5.1 migration, because the failure mode, an agent that loses its reasoning mid-task on a customer’s new API key while the vendor’s own tests stay green, is the kind that reaches a client before it reaches a dashboard.
06 — MethodMethodology.
A documentation census: each row is read from the framework’s current context-management docs and classified against Anthropic’s published rules. No framework was executed against the API for this table.
- What was collected
- For ten agent frameworks: the documented mechanism for shortening or rewriting conversation history, the compaction shape it produces in Anthropic’s terms, whether that shape edits the prefix before a thinking block, and the fix Anthropic’s guides prescribe for that shape.
- Sources
- Anthropic’s Fable 5.1 migration guide and preserved-thinking guide (platform.claude.com); LangChain short-term memory and middleware docs; Vercel AI SDK loop-control and Anthropic-provider docs; OpenClaw compaction docs; Mastra memory and memory-processor docs; Pydantic AI message-history docs; Semantic Kernel chat-history docs; Agno sessions docs; OpenAI Agents SDK sessions docs; CrewAI memory docs (unclassifiable, see text).
- As-of date
- Docs read September 3, 2026. The page is dated September 2 for the week it covers; this row is the only statement of the collection date.
- Classification rule
- “Breaks” means the documented default or primary mechanism changes system, tools or an earlier message before a thinking block that is then sent back. “Fine” means the documented shape carries no earlier thinking or keeps the prefix. A framework can be used safely in a configuration its docs do not lead with.
- Known limitations
- Framework docs change weekly and several projects may add Claude-specific handling in response to this change. Verdicts are about documented mechanisms, not observed 400s. Frameworks not listed were not read.
07 — ConclusionAppend-only, or strip the tail.
Most frameworks keep long sessions short by editing the past. Fable 5.1 now checks the past. The fixes are known, and they are the cache-friendly ones.
Six of the ten frameworks in this census shorten history in a shape Anthropic says will fail the check, and the most common shape, a summary with a verbatim tail, is the one that fails silently on a maintainer’s old key and loudly on a user’s new one.
The fix is not exotic. Replace the whole history with a summary, or strip thinking from the tail you keep, or move compaction to the server, and stop rebuilding system and tools between requests. Every one of those also keeps the prompt cache warm, which is why the teams that built cache-first loops in August have nothing to change in September.