preserved-thinking changedbuild-with-claude/preserved-thinking
Nearest release: v2.1.311, published 2 hours 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+7added
Lines−13removed
From line
439
where the diff opens
First seen
1 Sep 2026
this site's first read of the page
Recorded edits35to this page, all time
The whole hunk
from line 439, old and new numbered
/
from line 439
439439
440440### Check whether your code edits the prefix
441441
442<Tip>
443 **Automate this check with the Claude API skill.** In the latest version of [Claude Code](https://code.claude.com/docs/en/overview), open the repository that builds your requests and run the bundled [Claude API skill](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/claude-api-skill#checking-an-integration-for-preserved-thinking):
442Let Claude Code check your code for you
444443
445 Let Claude Code check your code for you
444```text
445/claude-api preserved-thinking-migration
446```
446447
447 ```text
448 /claude-api preserved-thinking-migration
449 ```
450
451 The skill captures a few of your own multi-turn sessions and diffs consecutive requests to find where your code edits the prefix. It then replays the sessions with `"drop_block"` and counts the thinking blocks the API drops. After that, it fixes one cause at a time and measures again after each fix.
452</Tip>
453
454First, diff what you send. Capture the request bodies your integration sends over a few normal turns, including a compaction or a tool change. For each pair of consecutive requests, compare `system`, `tools`, and the `messages` they share. They should be identical up to the newly appended turns.
448To check by hand, first diff what you send. Capture the request bodies your integration sends over a few normal turns, including a compaction or a tool change. For each pair of consecutive requests, compare `system`, `tools`, and the `messages` they share. They should be identical up to the newly appended turns.
455449
456450Then confirm against the API. Add the `thinking-binding-controls-2026-08-01` beta header, set `prefix_mismatch_behavior` to `"drop_block"`, and run a normal multi-turn session through your integration on claude-fable-5-1. The following example runs two turns the way your integration should: `messages` only grows, each assistant turn goes back exactly as the API returned it, `thinking` blocks included, and `block_binding` is set on every request. After each turn it prints the number of `thinking` blocks in the response and the number of dropped blocks:
457451
No line in this hunk matches that.