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.
Names in the bundlecompactBeforeNextTurncontext_management
Documented inapi/agents-and-tools/tool-use/tool-runner
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
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
This check may come from the bundled Anthropic SDK rather than from Claude Code itself.
Anthropic's documentation agrees
Anthropic's documentation has since written up context_management, on Error reference.