anthropic
Editing chat history now breaks Claude's thinking blocks
Promtime
anthropicAnthropic has made conversation history append-only on Claude Fable 5.1: editing the system prompt, the tools array or any earlier message invalidates the thinking blocks that follow, and the API answers with a 400 error naming the first failing block. The check is enforced by default for accounts created on or after August 31, 2026, 00:00 UTC, according to the Claude platform documentation.
At a glance
- Each thinking block carries a signature that binds it to the system prompt, the tools list and every preceding message, so changing any of those bytes invalidates that block and all later ones.
- The thinking-binding-controls-2026-08-01 beta header enables prefix_mismatch_behavior, whose "drop_block" setting removes the affected blocks unbilled and reports them in a top-level input_transformations array; the default remains "error".
- Integrations built on Claude Code, claude.ai, Claude Managed Agents or the Claude Agent SDK keep the prefix intact, so the migration work falls on teams running their own agent loops against the Messages API.
The rule lands on a habit common to hand-built agent harnesses: rewriting the transcript between calls to save tokens or to nudge the model. Anthropic frames the binding as a safety boundary, so reasoning produced under one set of instructions cannot be replayed under another. For teams that already keep the prefix stable the change likely costs nothing, and it doubles as a prompt-cache guarantee.
The API checks the model, the prefix and the thinking chain
Every thinking block sent back carries a signature. The API verifies that the current model is the same as or newer than the one that produced the block, since a block is readable by its own model and by later ones but not by earlier ones. A conversation moved to an older model fails that check, and those blocks are dropped for the request.
The second check covers the prefix: the top-level system prompt, tools and every message before the block must be byte-identical to the previous request. With server-side compaction the checked prefix restarts at the most recent compaction block. The third check follows the chain, since each thinking block records the one before it: removing blocks from the front of the history is allowed, removing one from the middle invalidates every thinking block after it.
Enforcement is on by default for accounts created on or after August 31, 2026
A new account is one created on or after August 31, 2026, 00:00 UTC, and the same definition applies on the Claude API and on the cloud platforms. Older accounts are not enforced by default on Claude Fable 5.1, but any request that sets prefix_mismatch_behavior opts into enforcement regardless of account age, which is the way to test the behaviour early.
On a prefix mismatch the default "error" returns a 400 invalid_request_error naming the first failing block, while "drop_block" removes that block and every thinking block after it and lets the request through, unbilled and listed in a top-level input_transformations array. In the Message Batches API the unset default drops failing blocks instead of failing the batch item.
A caught 400 is not cleared by retrying the same request: the documented recovery is to retry with "drop_block" and the beta header, then keep sending both for the rest of the session, since the drop applies to a single request.
Anthropic lists mid-conversation system messages and tool_addition as the replacements
Rather than rebuilding system each request, the documentation directs integrations to freeze it at session start and append a role: "system" message where the new instruction becomes true; the feature is stable on Claude Fable 5.1 and needs no beta header. Per-turn reminders become turn-scoped system messages with clear_at: "next_user_message", behind the mid-conversation-system-clear-at-2026-08-21 header.
Tool sets change through tool_addition and tool_removal blocks with the mid-conversation-tool-changes-2026-07-01 header, with not-yet-available tools declared as defer_loading: true. Client-side trimming gives way to server-side compaction (compact-2026-01-12) or context editing rules clear_tool_uses_20250919 and clear_thinking_20251015, and files referenced across turns should use a Files API file_id or base64 rather than a URL whose bytes change.
The documentation calls simple compaction the recommended shape, since it replays no earlier turns and leaves no thinking behind a rewritten prefix. Keep-tail compaction needs thinking and redacted_thinking stripped from carried-over turns; background compaction needs "drop_block" on every request that still carries thinking produced before the swap.
Testing under drop_block
Anthropic's suggested check is to run a normal multi-turn session with the beta header and prefix_mismatch_behavior set to "drop_block" and log input_transformations on every turn: empty arrays mean the history is intact, prefix_binding_mismatch points at the changed bytes, model_binding_mismatch means a router or fallback moved the conversation. Later models will enforce the check for all users; the documentation names no model and no date for that step.
Comments
No comments yet. Be the first.
Join the conversation
Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.
We only use your name and avatar from Google. We never store your email address.
