Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

prefix-checks changedbuild-with-claude/preserved-thinking/prefix-checks

Nearest release: v2.1.330, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+25added
Lines−25removed
From line 59 where the diff opens
First seen 12 Nov 2026 this site's first read of the page
Recorded edits2to this page, all time

The whole hunk

from line 59, old and new numbered
/
lines
from line 59
5959 
6060## If your code changes the system prompt, tools, or history
6161 
62| If your code… | What to do |
63| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
64| Rebuilds the system prompt with the date, a mode, or instruction files | Stop changing `system`. [Append your own instructions as a system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#new-instructions), a `role: "system"` entry in `messages`, and [state new values in the newest turn](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#changing-context). For text that other people can edit, see [Text that other people can edit](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#untrusted-text) instead. |
65| Adds, removes, or rewords a tool, or gains tools when an MCP server connects | Stop changing `tools`, and [add or remove tools in a system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#tool-changes). |
66| Trims, collapses, or summarizes older turns, and keeps the latest ones unchanged | [Let the API write the summary, or remove the kept turns’ thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#server-side-trimming). |
62| If your code… | What to do |
63| ----- | ----- |
64| Rebuilds the system prompt with the date, a mode, or instruction files | Stop changing `system`. [Append your own instructions as a system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#new-instructions), a `role: "system"` entry in `messages`, and [state new values in the newest turn](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#changing-context). For text that other people can edit, see [Text that other people can edit](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#untrusted-text) instead. |
65| Adds, removes, or rewords a tool, or gains tools when an MCP server connects | Stop changing `tools`, and [add or remove tools in a system message](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#tool-changes). |
66| Trims, collapses, or summarizes older turns, and keeps the latest ones unchanged | [Let the API write the summary, or remove the kept turns’ thinking](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions#server-side-trimming). |
6767 
6868Other causes, such as skipping thinking blocks whose text is empty or rebuilding a saved conversation, have fixes of their own: see [Change tools or instructions without failing the prefix check](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/change-tools-or-instructions). To find yours, [have an agent check your code](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#hand-to-an-agent).
6969 
from line 71
7171 
7272On the Claude API and [some cloud platforms](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#feature-availability), the result of failing the prefix check with [`prefix_mismatch_behavior`](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#preserved-thinking-controls) unset depends on the model:
7373 
74| Model with preserved thinking | Result |
75| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
76| Claude Fable 5.2 | 400 error |
77| Claude Mythos 5.2 | 400 error |
78| Claude Mythos 5.1 | 400 error |
79| Claude Fable 5.1 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
80| Claude Opus 5.5 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
81| Claude Sonnet 5.5 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
82| Claude Haiku 5.5 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
74| Model with preserved thinking | Result |
75| ----- | ----- |
76| Claude Fable 5.2 | 400 error |
77| Claude Mythos 5.2 | 400 error |
78| Claude Mythos 5.1 | 400 error |
79| Claude Fable 5.1 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
80| Claude Opus 5.5 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
81| Claude Sonnet 5.5 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
82| Claude Haiku 5.5 | [Possible 400 error](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#possible-400-error) |
8383 
8484Where the table says “Possible 400 error,” there are two cases: a request that fails the prefix check might get a 400 error or no error. When no error is returned, the failing blocks reach the model. Claude reads them like any other input, you’re billed for them, and Claude works from reasoning about content that has since changed.
8585 
from line 121
121121 
122122### What doesn’t count
123123 
124| This doesn’t count | Because |
125| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
126| `model`, `effort`, `max_tokens`, `tool_choice`, `metadata`, `thinking.display`, and other parameters | Only `system`, `tools`, and messages are compared |
127| JSON formatting or key order | The API compares parsed JSON, not its text |
128| `cache_control` markers | They say where to cache, and aren’t content that Claude reads |
129| A tool with `defer_loading: true` that nothing has referred to | It isn’t in Claude’s context until something refers to it |
124| This doesn’t count | Because |
125| ----- | ----- |
126| `model`, `effort`, `max_tokens`, `tool_choice`, `metadata`, `thinking.display`, and other parameters | Only `system`, `tools`, and messages are compared |
127| JSON formatting or key order | The API compares parsed JSON, not its text |
128| `cache_control` markers | They say where to cache, and aren’t content that Claude reads |
129| A tool with `defer_loading: true` that nothing has referred to | It isn’t in Claude’s context until something refers to it |
130130 
131131### Set `prefix_mismatch_behavior`
132132 
133133The [beta header](https://platform.claude.com/docs/en/api/beta-headers#beta-features-on-other-platforms) `thinking-binding-controls-2026-08-01` adds the setting `thinking.block_binding.prefix_mismatch_behavior` and the response’s `input_transformations` array.
134134 
135| Value | If a block fails the prefix check |
136| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
137| `"error"` | The API rejects the request with a 400 error that names the first invalid block |
138| `"drop_block"` | The API drops the invalid blocks, and the request succeeds. You aren’t billed for those blocks, but [dropping them can cost more](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/fix-bound-to-a-different-conversation#drop-block-cost) |
139| Not set, or `null` | [Depends on the model](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#outcomes) |
135| Value | If a block fails the prefix check |
136| ----- | ----- |
137| `"error"` | The API rejects the request with a 400 error that names the first invalid block |
138| `"drop_block"` | The API drops the invalid blocks, and the request succeeds. You aren’t billed for those blocks, but [dropping them can cost more](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/fix-bound-to-a-different-conversation#drop-block-cost) |
139| Not set, or `null` | [Depends on the model](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking/prefix-checks#outcomes) |
140140 
141141Blocks that fail the prefix check stay invalid on every later request that sends them, while the change is in place. The setting acts on the one request that carries it. With thinking off (`"disabled"` or `"between_tools"`), sending it is a 400 error on every model.
142142 
Feedback