Claude API thinking blocks 400 error: the prefix check to test before you move to Fable 5.2

Fable 5.2 now returns a 400 if you edit system, tools or earlier turns and replay a thinking block. Here is the prefix check to test, and how to fix it.

Share
Claude API thinking blocks 400 error: the prefix check to test before you move to Fable 5.2

Yes, the Claude API now returns a 400 if your code edits system, tools or an earlier message and then sends back a later turn's thinking block from Claude Fable 5.2 or Claude Mythos 5.2. The November 9 release notes say both models enforce this prefix check for every account, whatever its age.

TL;DR: Fable 5.2 and Mythos 5.2 reject any request that replays a thinking block after something before it has changed. Edited system prompts, reworded tool descriptions, trimmed turns and removed reminders all count. Keep history append-only, or drop the kept turns' thinking when you cut. Test it by changing system in a saved conversation and replaying it.

Key Takeaways

  • Enforced everywhere: Fable 5.2 and Mythos 5.2 apply the prefix check to every account, new or old.
  • Small edits break it: one reworded sentence in a tool description invalidates the thinking after it.
  • What never triggers it: compaction at a token threshold and context editing never trigger the check, while your own trimming can.
  • Models differ: with the setting unset, some models return a 400 and others quietly send the stale thinking to Claude and bill you for it.
  • You can test it today: change the system prompt of a saved conversation, replay it with the beta header, and read the result.

What does the prefix check compare?

The prefix check compares everything that came before a thinking block (system, tools and every earlier message) against a fingerprint recorded when Claude produced the block. Per the prefix check documentation, a check fails if system, tools or an earlier message changed after Claude produced a block. It also fails if a thinking block between others was left out or moved.

The model, effort and max_tokens parameters and cache_control markers are ignored.

The docs give an example: an app puts today's date in its system prompt. At midnight the prefix of every earlier thinking block changes, and the next request can fail.

Which models return a 400, and which stay quiet?

Fable 5.2, Mythos 5.2 and Mythos 5.1 return a 400 when a block fails the check, and four other models may or may not. The same page lists the result for each model on the Claude API when prefix_mismatch_behavior is unset.

Model Result when the check fails (setting unset) What it means for you
Claude Fable 5.2 400 error Fix history first
Claude Mythos 5.2 400 error Same as Fable 5.2
Claude Mythos 5.1 400 error Already enforced
Claude Fable 5.1 Possible 400 error Release notes: error by default on accounts created on or after August 31, 2026
Claude Opus 5.5 Possible 400 error Silent pass still bills
Claude Sonnet 5.5 Possible 400 error Same as Opus 5.5
Claude Haiku 5.5 Possible 400 error Same as Opus 5.5

The quiet case is the risky one. With no error, the docs say the failing blocks reach the model, you are billed for them, and Claude works from reasoning about content that has since changed.

Chart of which Claude models return a 400 when the prefix check fails

Model switching has its own rule. The release notes say Fable 5.2 and Mythos 5.2 read other models' thinking blocks, including those from Claude Opus 5.5, Claude Sonnet 5.5 and Claude Haiku 5.5, so a conversation that moves onto either one keeps its reasoning. Outside that pair, the API drops the blocks and the request still succeeds.

Which agent patterns break the check?

Any agent that rewrites what it already sent can break it. The troubleshooting page lists these causes of the "bound to a different conversation" error:

  • An edited, reordered or removed turn
  • A per-turn reminder that was injected and later removed
  • A rebuilt system prompt or tools array
  • Client-side compaction that kept recent turns with their thinking

The change-tools guide adds more. One reworded sentence in a tool description is enough. A filter that skips thinking blocks that look empty breaks it too, because a block with empty text is still complete.

Compaction at a token threshold and context editing change only what Claude reads, so they never count. If your own code writes the summary or cuts older turns, the kept turns' thinking fails because the messages it followed are gone.

Some setups have nothing to change: Claude Code, claude.ai or Claude Managed Agents managing your history.

How do you test your agent before moving to Fable 5.2?

Take a conversation that already holds a thinking block, change the system prompt, and replay it to the same model with the thinking-binding-controls-2026-08-01 beta header, leaving prefix_mismatch_behavior unset. The prefix check page describes this test.

The response tells you which case you are in:

  1. A 400 that says bound to a different conversation: the request failed the check.
  2. A 200 whose input_transformations array has thinking_mismatch_allowed entries: the request passed, and each entry names a stale block that reached Claude.
  3. A 200 with an empty array: no block failed, so confirm the conversation held a thinking block.

Then replay recorded production conversations through your compaction and trimming code with prefix_mismatch_behavior set to "error". Every failure becomes a 400 that names the first invalid block. In production, keep the setting unset, keep the header on, and log input_transformations.

What do you do when a conversation already has the error?

Send "drop_block" on that conversation's later requests, or strip the named block and every later thinking block, then fix the cause. Retrying the same body does not clear the error, and fixing your code does not help if the stored history holds the edit.

Flow of the recovery options after a 400: drop_block, strip blocks, or fix append-only history

Dropping has a price. The docs say you are not billed for dropped blocks, but dropping can cost more, so do not send it on every conversation. I found no figure for that cost, so measure your own token use.

The durable fix is an append-only history, built on three habits from the docs:

  • Send each assistant turn back exactly as the API returned it, including thinking blocks with empty text.
  • Build system and tools once per conversation and send that copy every time.
  • Put every update in a new message at the end, and leave it there.

For trimming, let the API write the summary with on-demand compaction under the documented conditions. If your own code cuts, remove the kept turns' thinking or send "drop_block", and cut rarely, in large steps.

Frequently Asked Questions

Does the 400 error hit Claude Code users?

No, if Claude Code manages your conversation history. The prefix check documentation lists Claude Code, claude.ai and Claude Managed Agents as cases where you have nothing to change. Custom agents that rewrite their own history are exposed.

Do I need the beta header to see the error?

No. The error appears without it. You need the thinking-binding-controls-2026-08-01 header only to set prefix_mismatch_behavior or to receive the input_transformations array.

Do compaction and context editing trigger the 400?

Compaction at a token threshold and context editing never do, because they change only what Claude reads. On-demand compaction can, when the conditions for keeping thinking are not met. Summaries your own code writes fail too.

What happens if I send Fable 5.2 thinking blocks to another model?

Mythos 5.2 reads them. For a model outside the Fable 5.2 and Mythos 5.2 pair, the API drops the blocks and the request still succeeds, per the release notes.

Conclusion

Before you move an agent to Fable 5.2 or Mythos 5.2, find every place your code edits system, tools or an earlier turn. Replay a saved conversation with a changed system prompt to see what happens. Make history append-only, let the API handle trimming where it can, and keep "drop_block" for recovery.


Learn from me

Claude Code in Practice

Claude Code in Practice, my Maven cohort. Master Claude Code from fundamentals to advanced orchestration: skills, subagents, hooks, MCP, and production automation. Join the next cohort →

Hire us

Traversaal.ai. We're a team of forward deployed engineers solving the toughest AI problems for Fortune 100 companies: document intelligence, agentic data platforms, and real-time web intelligence, deployed in production. Work with our team to deploy your next agentic ecosystem. Talk to Traversaal.ai →

Join us

Want to solve these problems with us? We're always looking for forward deployed engineers who want to ship production AI. jobs@traversaal.ai