What
Compaction summarizes a long conversation so it fits in the model's memory, either when you run /compact or automatically. When it starts, Claude Code now resets its count of how long the current response is and signals a "requesting" state, before announcing that compaction has begun.
Why
The spinner or token counter should no longer show leftover numbers from the previous response while compaction runs.
Names in the bundle/compact
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 /compact, on Agent SDK reference - TypeScript.
* `local_command`: the name of the command the turn dispatched, on the success result of a turn that a command completed without entering the agent loop, such as `/compact`. The name is folded to lowercase letters and underscores, so `/rel…agent-sdk/typescript 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
How the display actually renders these changes is not confirmed.
Anthropic's documentation agrees
Anthropic's documentation has since written up /compact, on Agent SDK reference - TypeScript.