Follow Discord
Sweep 27 Oct 2026 · 19:04Z Build v2.1.312 531 read Stable v2.1.308 Latest v2.1.312 Next v2.1.312 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

context-editing changedbuild-with-claude/context-editing

Nearest release: v2.1.312, 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+45added
Lines−45removed
From line 46 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits21to this page, all time

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 |
49 | Model class | Keep all prior thinking | Keep only the last turn’s thinking |
5050 | ---------------- | --------------------------- | ------------------------------------------ |
5151 | Opus | Claude Opus 4.5 and later | Claude Opus 4.1 and earlier |
5252 | Sonnet | Claude Sonnet 4.6 and later | Claude Sonnet 4.5 (deprecated) and earlier |
from line 66
6666 
6767### Context editing and prompt caching
6868 
69Context editing's interaction with [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) varies by strategy:
69Context editing’s interaction with [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) varies by strategy:
7070 
71* **Tool result clearing:** Invalidates cached prompt prefixes when content is cleared. To account for this, clear enough tokens to make the cache invalidation worthwhile. Use the `clear_at_least` parameter to ensure a minimum number of tokens is cleared each time. You'll incur cache write costs each time content is cleared, but subsequent requests can reuse the newly cached prefix.
71* **Tool result clearing:** Invalidates cached prompt prefixes when content is cleared. To account for this, clear enough tokens to make the cache invalidation worthwhile. Use the `clear_at_least` parameter to ensure a minimum number of tokens is cleared each time. You’ll incur cache write costs each time content is cleared, but subsequent requests can reuse the newly cached prefix.
7272 
7373* **Thinking block clearing:** When thinking blocks are **kept** in context (not cleared), the prompt cache is preserved, allowing cache hits and reducing input token costs. When thinking blocks are **cleared**, the cache is invalidated at the point where clearing occurs. Configure the `keep` parameter based on whether you want to prioritize cache performance or context window availability.
7474 
from line 1727
17271727| -------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17281728| `trigger` | 100,000 input tokens | Defines when the context editing strategy activates. Once the prompt exceeds this threshold, clearing starts. You can specify this value in either `input_tokens` or `tool_uses`. |
17291729| `keep` | 3 tool uses | Defines how many recent tool use/result pairs to keep after clearing occurs. The API removes the oldest tool interactions first, preserving the most recent ones. |
1730| `clear_at_least` | None | Ensures a minimum number of tokens is cleared each time the strategy activates. If the API can't clear at least the specified amount, the strategy will not be applied. This helps determine if context clearing is worth breaking your prompt cache. |
1730| `clear_at_least` | None | Ensures a minimum number of tokens is cleared each time the strategy activates. If the API can’t clear at least the specified amount, the strategy will not be applied. This helps determine if context clearing is worth breaking your prompt cache. |
17311731| `exclude_tools` | None | List of tool names whose tool uses and results should never be cleared. Useful for preserving important context. |
1732| `clear_tool_inputs` | `false` | Controls whether the tool call parameters are cleared along with the tool results. By default, only the tool results are cleared while keeping Claude's original tool calls visible. |
1732| `clear_tool_inputs` | `false` | Controls whether the tool call parameters are cleared along with the tool results. By default, only the tool results are cleared while keeping Claude’s original tool calls visible. |
17331733 
17341734## Context editing response
17351735 
from line 2082
20822082 
20832083## Using with the memory tool
20842084 
2085Context editing can be combined with the [memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool). When your conversation context approaches the configured clearing threshold, Claude receives an automatic warning to preserve important information. This allows Claude to save tool results or context to its memory files before they're cleared from the conversation history.
2085Context editing can be combined with the [memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool). When your conversation context approaches the configured clearing threshold, Claude receives an automatic warning to preserve important information. This allows Claude to save tool results or context to its memory files before they’re cleared from the conversation history.
20862086 
20872087This combination allows you to:
20882088 
from line 2307
23072307<Warning>
23082308 **Anthropic recommends server-side compaction over SDK compaction.** [Server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) handles context management automatically with less integration complexity, better token usage calculation, and no client-side limitations. Use SDK compaction only if you specifically need client-side control over the summarization process.
23092309 
2310 The `compaction_control` parameter is deprecated in the TypeScript and Ruby SDKs and will be removed in a future version. The TypeScript and Ruby SDKs emit a deprecation warning when it is enabled. The Python SDK removed it in v1.0. To use server-side compaction with a tool runner, pass the `compact_20260112` edit in the request's `context_management` parameter.
2310 The `compaction_control` parameter is deprecated in the TypeScript and Ruby SDKs and will be removed in a future version. The TypeScript and Ruby SDKs emit a deprecation warning when it is enabled. The Python SDK removed it in v1.0. To use server-side compaction with a tool runner, pass the `compact_20260112` edit in the request’s `context_management` parameter.
23112311</Warning>
23122312 
23132313<Note>
from line 2332
23322332<Tabs>
23332333 <Tab title="cURL">
23342334 <Note>
2335 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers.
2335 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers.
23362336 </Note>
23372337 </Tab>
23382338 
23392339 <Tab title="CLI">
23402340 <Note>
2341 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers without SDK-side integration.
2341 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers without SDK-side integration.
23422342 </Note>
23432343 </Tab>
23442344 
23452345 <Tab title="Python">
23462346 <Note>
2347 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2347 In v1.0 and later, the Python SDK’s tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
23482348 </Note>
23492349 </Tab>
23502350 
from line 2368
23682368 
23692369 <Tab title="C#">
23702370 <Note>
2371 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2371 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
23722372 </Note>
23732373 </Tab>
23742374 
23752375 <Tab title="Go">
23762376 <Note>
2377 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2377 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
23782378 </Note>
23792379 </Tab>
23802380 
23812381 <Tab title="Java">
23822382 <Note>
2383 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2383 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
23842384 </Note>
23852385 </Tab>
23862386 
23872387 <Tab title="PHP">
23882388 <Note>
2389 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2389 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
23902390 </Note>
23912391 </Tab>
23922392 
from line 2464
24642464<Tabs>
24652465 <Tab title="cURL">
24662466 <Note>
2467 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers.
2467 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers.
24682468 </Note>
24692469 </Tab>
24702470 
24712471 <Tab title="CLI">
24722472 <Note>
2473 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers without SDK-side integration.
2473 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers without SDK-side integration.
24742474 </Note>
24752475 </Tab>
24762476 
24772477 <Tab title="Python">
24782478 <Note>
2479 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2479 In v1.0 and later, the Python SDK’s tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
24802480 </Note>
24812481 </Tab>
24822482 
from line 2501
25012501 
25022502 <Tab title="C#">
25032503 <Note>
2504 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2504 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
25052505 </Note>
25062506 </Tab>
25072507 
25082508 <Tab title="Go">
25092509 <Note>
2510 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2510 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
25112511 </Note>
25122512 </Tab>
25132513 
25142514 <Tab title="Java">
25152515 <Note>
2516 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2516 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
25172517 </Note>
25182518 </Tab>
25192519 
25202520 <Tab title="PHP">
25212521 <Note>
2522 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2522 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
25232523 </Note>
25242524 </Tab>
25252525 
from line 2550
25502550<Tabs>
25512551 <Tab title="cURL">
25522552 <Note>
2553 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers.
2553 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers.
25542554 </Note>
25552555 </Tab>
25562556 
25572557 <Tab title="CLI">
25582558 <Note>
2559 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers without SDK-side integration.
2559 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers without SDK-side integration.
25602560 </Note>
25612561 </Tab>
25622562 
25632563 <Tab title="Python">
25642564 <Note>
2565 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2565 In v1.0 and later, the Python SDK’s tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
25662566 </Note>
25672567 </Tab>
25682568 
from line 2590
25902590 
25912591 <Tab title="C#">
25922592 <Note>
2593 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2593 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
25942594 </Note>
25952595 </Tab>
25962596 
25972597 <Tab title="Go">
25982598 <Note>
2599 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2599 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
26002600 </Note>
26012601 </Tab>
26022602 
26032603 <Tab title="Java">
26042604 <Note>
2605 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2605 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
26062606 </Note>
26072607 </Tab>
26082608 
26092609 <Tab title="PHP">
26102610 <Note>
2611 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2611 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
26122612 </Note>
26132613 </Tab>
26142614 
from line 2642
26422642<Tabs>
26432643 <Tab title="cURL">
26442644 <Note>
2645 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers.
2645 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers.
26462646 </Note>
26472647 </Tab>
26482648 
26492649 <Tab title="CLI">
26502650 <Note>
2651 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers without SDK-side integration.
2651 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers without SDK-side integration.
26522652 </Note>
26532653 </Tab>
26542654 
26552655 <Tab title="Python">
26562656 <Note>
2657 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2657 In v1.0 and later, the Python SDK’s tool runner does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
26582658 </Note>
26592659 </Tab>
26602660 
from line 2687
26872687 
26882688 <Tab title="C#">
26892689 <Note>
2690 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2690 The C# SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
26912691 </Note>
26922692 </Tab>
26932693 
26942694 <Tab title="Go">
26952695 <Note>
2696 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2696 The Go SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
26972697 </Note>
26982698 </Tab>
26992699 
27002700 <Tab title="Java">
27012701 <Note>
2702 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2702 The Java SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
27032703 </Note>
27042704 </Tab>
27052705 
27062706 <Tab title="PHP">
27072707 <Note>
2708 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2708 The PHP SDK includes a tool runner, but it does not support client-side `compaction_control`. Use [server-side compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold) instead: it works with the tool runner by passing the `compact_20260112` edit in the request’s `context_management` parameter.
27092709 </Note>
27102710 </Tab>
27112711 
from line 2743
27432743 
27442744The built-in summary prompt instructs Claude to create a structured continuation summary including:
27452745 
27461. **Task Overview:** The user's core request, success criteria, and constraints.
27461. **Task Overview:** The user’s core request, success criteria, and constraints.
274727472. **Current State:** What has been completed, files modified, and artifacts produced.
274827483. **Important Discoveries:** Technical constraints, decisions made, errors resolved, and failed approaches.
274927494. **Next Steps:** Specific actions needed, blockers, and priority order.
from line 2827
28272827<Tabs>
28282828 <Tab title="cURL">
28292829 <Note>
2830 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers.
2830 Compaction runs client-side in the SDK `tool_runner` helpers, so it has no direct HTTP equivalent. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers.
28312831 </Note>
28322832 </Tab>
28332833 
28342834 <Tab title="CLI">
28352835 <Note>
2836 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic's servers without SDK-side integration.
2836 The CLI does not include a `tool_runner` helper. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead, which handles compaction on Anthropic’s servers without SDK-side integration.
28372837 </Note>
28382838 </Tab>
28392839 
28402840 <Tab title="Python">
28412841 <Note>
2842 In v1.0 and later, the Python SDK's tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
2842 In v1.0 and later, the Python SDK’s tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
28432843 </Note>
28442844 </Tab>
28452845 
28462846 <Tab title="TypeScript">
2847 The TypeScript SDK's `toolRunner` supports compaction but does not log events. Detect compaction by watching `runner.params.messages.length` shrink between turns:
2847 The TypeScript SDK’s `toolRunner` supports compaction but does not log events. Detect compaction by watching `runner.params.messages.length` shrink between turns:
28482848 
28492849 ```typescript TypeScript
28502850 let prevMsgCount = 0;
from line 2861
28612861 
28622862 <Tab title="C#">
28632863 <Note>
2864 The C# SDK's tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
2864 The C# SDK’s tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
28652865 </Note>
28662866 </Tab>
28672867 
28682868 <Tab title="Go">
28692869 <Note>
2870 The Go SDK's tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
2870 The Go SDK’s tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
28712871 </Note>
28722872 </Tab>
28732873 
28742874 <Tab title="Java">
28752875 <Note>
2876 The Java SDK's tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
2876 The Java SDK’s tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
28772877 </Note>
28782878 </Tab>
28792879 
28802880 <Tab title="PHP">
28812881 <Note>
2882 The PHP SDK's tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
2882 The PHP SDK’s tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
28832883 </Note>
28842884 </Tab>
28852885 
Feedback