17. History compaction (Compact)
[!ref] Full details in the User Manual, "History compaction".
17.1 Triggers
| Source | Timing |
|---|---|
| Manual | ⌘⇧K / tab right-click / /compact |
| Auto | Assistant triggers as its own context approaches the limit |
| Session switch | On-demand for long sessions |
17.2 Summary fields
| Field | Description |
|---|---|
compacted_from_ids |
List of compacted original message ids |
summary |
LLM-generated summary text |
plan |
Plan state at the time |
todos |
All todo entries at the time |
decisions |
User-confirmed decisions |
facts |
Required facts (paths, versions, configs) |
excluded_from_context |
Whether the originals are hidden from the LLM |
17.3 Multiple compactions
Compaction is append-only: each adds a new node instead of replacing. The UI shows "summary →(expand)→ originals" cascading; you can drill down to the earliest history.
