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

Claude Code v2.1.285 ·

compactBeforeNextTurn can't be used alongside a compaction edit

An error now stops compactBeforeNextTurn from being used while context_management has a compaction edit

You'll notice Improvements
JSON All of v2.1.285
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
CompactionArea: what it touches
ImprovementsKind: in v2.1.285,
ImprovementsSection of the release

Unclear This check may come from the bundled Anthropic SDK rather than from Claude Code itself.

What

Compaction shrinks earlier conversation to free room. Using compactBeforeNextTurn while context_management contains a compaction edit now raises an error saying it can't be used while context_management has a compaction edit.

Why

If you build on the SDK, you get a clear error instead of two compaction settings clashing.

Read from
Names in the bundlecompactBeforeNextTurncontext_management
What the documentation says
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up compactBeforeNextTurn, on compaction-on-demand. The SDK [tool runner](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner) in Python, TypeScript, C#, Go, Java, PHP, and Ruby can send the compaction request for you. When you decide to compact, call `compact_before_n… build-with-claude/compaction-on-demand see the edit
Added since A small documentation edit on Connect Claude Code to an LLM gateway touched a line naming context_management after this was published. | `400` errors naming `context_management`, `Extra inputs are not permitted`, or other unrecognized fields | The gateway forwards requests to an upstream that rejects fields Claude Code sends to Anthropic-format endpoints | Set `CLAUDE_COD… llm-gateway-connect see the edit
Confirmed since Anthropic's documentation has since written up context_management, on Error reference. Claude Code sends beta-only fields such as `context_management` alongside an `anthropic-beta` header that enables them. When a gateway forwards the body but drops the header, the API sees fields it doesn't recognize. errors see the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtThis check may come from the bundled Anthropic SDK rather than from Claude Code itself.
Anthropic's documentation agreesAnthropic's documentation has since written up context_management, on Error reference.

See this entry in the whole of v2.1.285 →

Feedback