anthropic

Claude Fable 5.1 errors out if you edit past turns

Claude News

anthropic

Claude Fable 5.1 rejects requests that change the system prompt, the tools array or any earlier message while sending thinking blocks back, answering with a 400 invalid_request_error that names the first failing block. According to the Claude documentation, the check is enforced by default for accounts created on or after August 31, 2026, 00:00 UTC, on the Claude API and on cloud platforms alike.

At a glance

  • Each returned thinking block carries a signature the API uses to verify that the system prompt, the tools array and every preceding message are byte-identical to when the block was produced.
  • Setting thinking.block_binding.prefix_mismatch_behavior to "drop_block" with the thinking-binding-controls-2026-08-01 beta header removes the offending block and every thinking block after it instead of failing, and dropped blocks are not billed.
  • Integrations that call the Messages API directly have to treat the messages array as append-only, while Claude Code, claude.ai, Claude Managed Agents and the Claude Agent SDK already keep the prefix intact.

Most hand-built agent loops edit history as a matter of routine: trimming old turns, rebuilding the system prompt with the current time or a token budget, injecting a per-turn reminder and deleting it on the next request. Those patterns now break on the newest model, and the documentation states that later models will enforce the check for all users, so the exemption for older accounts reads as a migration window rather than a lasting carve-out.

The API runs three checks on each thinking block sent back

The documentation gives the reason as replay protection: reasoning produced under one set of instructions must not be replayable under another, potentially adversarial set. The first of the three checks is the model itself, since a block is readable by the model that produced it and by later models, not by earlier ones.

A conversation moved to a newer model keeps its reasoning; one 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, the tools array and every message before the block. With server-side compaction the checked prefix starts at the most recent compaction block.

The third check requires the chain of earlier thinking blocks to be unbroken. Blocks can be removed from the front of the history, while removing one from the middle invalidates every thinking block after it. Cache_control markers and request parameters outside system, tools and messages can change freely.

Mid-conversation system messages replace rebuilding the top-level prompt

Instructions that change mid-session go into a role: "system" message appended at the point in messages where they become true, instead of a rebuilt top-level prompt. The model treats it with system-prompt authority, and no beta header is needed on Claude Fable 5.1. In a tool loop it belongs after the tool_result user message, never between an assistant tool_use and its tool_result.

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: a cleared message renders nothing and costs no input tokens, but stays in the array so later thinking remains valid. Tool sets change through tool_addition and tool_removal blocks under mid-conversation-tool-changes-2026-07-01.

Tools that are not yet available are declared at session start with defer_loading: true, and an unreferenced deferred tool is not part of the prefix, so appending one is safe while appending a regular tool is not. Depth of thinking is adjusted per turn through output_config.effort on a role: "system" message.

Server-side compaction is exempt because the check compares what the client sent

Client-side truncation and summarization that keeps recent turns verbatim fails, because those turns' thinking was produced while the removed history was still in place. Compaction and context editing on the server do not count as edits, since the check compares the conversation as sent rather than the server's edited copy.

Simple compaction, where the session is summarized into one message and the next request starts from that summary plus the new instruction, needs no changes, as no earlier thinking remains. Keep-tail compaction requires stripping thinking and redacted_thinking from carried-over assistant turns, or sending "drop_block" and letting the API strip them.

Content referenced across turns should be uploaded once through the Files API and sent by file_id, or as base64, because the fetched bytes of a url source are part of the checked prefix. Responses list removed blocks in a top-level input_transformations array, with reason prefix_binding_mismatch or model_binding_mismatch.

How to test from an older account

Setting prefix_mismatch_behavior opts a request into enforcement regardless of account age, which is how an older account tests the check; a request that edits history without the beta header and comes back as a 400 naming that header means the account is already enforced.

Retrying a failed request unchanged does not clear the error: the retry has to carry "drop_block" and the beta header, and the rest of the session with it. No date is given for enforcement across all accounts beyond the statement that later models will apply the check to every user.

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.

Claude Fable 5.1 errors out if you edit past turns · News