The whole hunk
from line 46, old and new numbered
/
lines
from line 46
4646<Tip>
4747 **Default behavior:** The default varies by model class.
4848
49 | Model class | Keep all prior thinking | Keep only the last turn's thinking |
50 | ----------- | --------------------------- | ----------------------------------- |
51 | Opus | Claude Opus 4.5 and later | Claude Opus 4.1 and earlier |
52 | Sonnet | Claude Sonnet 4.6 and later | Claude Sonnet 4.5 and earlier |
53 | Haiku | (none) | All models through Claude Haiku 4.5 |
49 | Model class | Keep all prior thinking | Keep only the last turn's thinking |
50 | ---------------- | --------------------------- | ----------------------------------- |
51 | Opus | Claude Opus 4.5 and later | Claude Opus 4.1 and earlier |
52 | Sonnet | Claude Sonnet 4.6 and later | Claude Sonnet 4.5 and earlier |
53 | Haiku | (none) | All models through Claude Haiku 4.5 |
54 | Fable and Mythos | All models | (none) |
5455
5556 Use this strategy to override the default. If your code runs across multiple model tiers, set `keep` explicitly rather than relying on the per-model default.
5657</Tip>
from line 62
6162
6263Context editing is applied server-side before the prompt reaches Claude. Your client application maintains the full, unmodified conversation history. You do not need to sync your client state with the edited version. Continue managing your full conversation history locally as you normally would.
6364
65On Claude Fable 5.1, server-side context management never invalidates thinking blocks. Client-side edits to earlier turns can invalidate the thinking blocks in every later assistant turn. For new accounts created on or after August 31, 2026, a request that replays an invalidated block is rejected unless you opt into dropping it. See [Preserved thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#preserved-in-conversation).
66
6467### Context editing and prompt caching
6568
6669Context editing's interaction with [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) varies by strategy:
from line 921
918921
919922The `clear_thinking_20251015` strategy supports the following configuration:
920923
921| Configuration option | Default | Description |
922| -------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
923| `keep` | Model-specific | Defines how many recent assistant turns with thinking blocks to preserve. Use `{type: "thinking_turns", value: N}` where N must be > 0 to keep the last N turns, or `"all"` to keep all thinking blocks. Opus 4.5+ and Sonnet 4.6+: all turns. Earlier Opus/Sonnet and all Haiku: last turn only. |
924| Configuration option | Default | Description |
925| -------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
926| `keep` | Model-specific | Defines how many recent assistant turns with thinking blocks to preserve. Use `{type: "thinking_turns", value: N}` where N must be > 0 to keep the last N turns, or `"all"` to keep all thinking blocks. Opus 4.5+ and Sonnet 4.6+: all turns. Fable and Mythos models: all turns. Earlier Opus/Sonnet and all Haiku: last turn only. |
924927
925928**Example configurations:**
926929