compaction-on-demand changedbuild-with-claude/compaction-on-demand
Nearest release: v2.1.333, published 4 hours after 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+1added
Lines−0removed
From line
845
where the diff opens
First seen
21 Sep 2026
this site's first read of the page
Recorded edits27to this page, all time
The whole hunk
from line 845, old and new numbered
/
from line 845
845845## Limits and interactions with other features
846846
847847* **Threshold compaction and context editing.** You can’t send `compaction` and `context_management` on the same request. Threshold compaction (`compact_20260112`) can’t run on a request that carries a signed block.
848* **Message threads.** Compaction on demand is not available with message threads (see [Features that threads don’t support](https://platform.claude.com/docs/en/build-with-claude/message-threads#unsupported)). On the Claude API, Claude Platform on AWS, and Claude in Microsoft Foundry, a thread accepts one form of threshold compaction (see [Message threads](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold#message-threads) on Compaction at a token threshold).
848849* **Prompt caching.** `cache_control` on the block places a breakpoint after the summary.
849850* **Mid-conversation system messages and tool changes.** `role: "system"` messages inside the summarized range are summarized too, so their text instructions stop applying once the block replaces them. A [per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort-per-message) level they set isn’t carried over either: until a later message sets a level, turns run at the request’s top-level `output_config.effort`, or the model’s default if you don’t set one. If an instruction or effort level still matters, state it again in a `role: "system"` message. Send that message right after your next new `user` turn, and leave it in your history from then on. For [tool changes](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes), and for where that message goes when you keep turns after the block, see [Change the system prompt or tools](https://platform.claude.com/docs/en/build-with-claude/compaction-thinking-blocks#change-the-system-prompt-or-tools).
850851* **Task budgets.** Don’t send the `remaining` value of a [task budget](https://platform.claude.com/docs/en/build-with-claude/task-budgets) (`output_config.task_budget.remaining`) with `compaction` or on requests that carry the block. Doing so returns a 400 error.
No line in this hunk matches that.