Cmd. /compact
Summarize the current conversation to free context.
Key takeaways
- Summarize the current conversation to free context.
- Check the input surface and availability before using the examples below.
Purpose
Summarize the current conversation to free context.
/compact [instructions]Availability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-09-22 · Claude Code 2.1.278 |
The installed command menu and account or organization settings determine availability.
Examples
/compact Preserve the migration decisions and failing test namesEffects and persistence
Replaces older conversation context with a summary. Identify decisions and constraints that must survive before compacting.
Cautions
Preserve essential decisions and constraints explicitly; a summary may omit details from earlier turns.