/compact
The slash command that summarizes the conversation to prevent hitting the context limit.
Specs
Verified:
- Kind
- Slash command (inside TUI session)
- Syntax
- /compact
- First seen
- —unverified
- Inline args
- Not supported
The official description of /compact is "summarize conversation to prevent hitting the context limit" — it folds the current conversation history into a summary and frees up the context window. First-seen version is unverified (our coverage starts at 0.154.0 and the command predates it).
Key features
- Summarizes conversation history to free up context
- No arguments — invoke as /compact directly
Use cases
Use it when a long session approaches the context limit, or after a topic switch when you want the model to drop stale history.
Install
Type `/compact` in the TUI.
Caveats
Compaction is a lossy summary — detail can be dropped. Have the model persist key decisions (e.g. into AGENTS.md or a task file) before compacting.
Added
Updated
Verified