/compact
A Claude Code slash command, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary. See how compaction handles rules, skills, and memory files
Anthropic's own wording. Read off Commands, captured 2026-09-28.
In the changelogs
25Releases whose published page names /compact.
-
v2.1.305
/usage can suggest ways to save and queue a fix for you
/usage can now point out what is costing you most and suggest fixes such as
/compactor lower effort, which you can queue as a follow-upfound in this entry's text
-
v2.1.293
/compactnow notes when its message already shows the summaryThe result of
/compactnow records whether its on-screen message repeats the conversation summaryfound in this entry's text, named in this entry
-
v2.1.286
/compact,/clearand/rewindask to confirm inside an agent viewTyping
/compact,/clearor/rewindwhile viewing an agent now asks you to confirm running it on the main conversationfound in this entry's text, named in this entry
-
v2.1.283
The compaction progress bar under the spinner is gone
The spinner row no longer shows a percentage bar while a conversation is being compacted
found in this entry's text
-
v2.1.283
Progress display resets when compaction starts
When compaction begins, Claude Code now resets the response length counter and switches the display to a requesting state
found in this entry's text, named in this entry
-
v2.1.282
Warning before resuming a long, idle conversation that would use much of your usage limit
Resuming a large, long-idle conversation can show an estimate of how much of your 5-hour usage limit it will use, with an option to start fresh
found in this entry's text
-
v2.1.274
Many-image dimension error no longer suggests /compact when compaction is disabled
Image-too-large error stops suggesting /compact when compaction is disabled
found in this entry's text
-
v2.1.274
Critical memory usage banner text unchanged but reformatted with memoized hook
The 'Critical memory usage' banner code was reorganized with memoization, keeping the same wording
found in this entry's text
-
v2.1.267
SDK/headless sessions get an explicit rejection for compact()
Calling compact() in headless SDK sessions now returns a clear rejection instead of silently doing nothing
found in this entry's text
-
v2.1.267
session.compact implementation gated by DISABLE_COMPACT
session.compact now blocks itself while DISABLE_COMPACT is set or a turn is still running
found in this entry's text
-
v2.1.265
New 'command.run' hook pipeline for slash-command dispatch
Slash commands can now be intercepted and their output overridden by a new 'command.run' hook
found in this entry's text
-
v2.1.265
late-tool-additions rejection message now also mentions inline-tools fallback
Rejected late-tool-addition warning now also mentions falling back to inline tools
found in this entry's text
-
v2.1.257
MCP late tool-addition rejections now sticky-reject a beta until /clear or /compact
When an MCP server rejects a late tool addition, the beta stays rejected until you run /clear or /compact.
found in this entry's text, named in this entry
-
v2.1.248
DISABLE_COMPACT now takes effect mid-session
Setting or clearing DISABLE_COMPACT now takes effect immediately, not just at startup.
named in this entry, found in this entry's text
-
v2.1.216
Context Over-Limit Warning Improved
found in this entry's text
-
v2.1.201
claude-sonnet-5 added to model compatibility list
found in this entry's text
- v2.1.128
-
v2.1.108
JavaScript REPL Tool
found in this entry's text
-
v2.1.108
Usage Analysis Dashboard (Birch Compass) [Gradual Rollout]
found in this entry's text
-
v2.1.98
Context Limit Messaging
found in this entry's text
-
v2.1.41
Image Dimension Error Handling
found in this entry's text
-
v2.1.20
Compact Conversation Keybinding
found in this entry's text
-
v0.2.36
Improvements
found in this entry's text
-
v0.2.33
New Features
found in this entry's text
-
v0.2.33
User Experience Improvements
found in this entry's text
First cited
7The earliest release whose published evidence quoted /compact was v2.1.248, 27 Aug 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
1 further span in the ledger name it. The list above is the earliest first and stops at 6.
Presence across releases
0The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the slash command does. All slash commands.