# `compact` Compact the conversation to free context. **Input** — `instruction` (optional): what the summary should focus on. The earlier messages are replaced by a summary the model writes itself, and the most recent turns are kept verbatim. It is the same operation that runs automatically as the context nears the model's window; the tool is the manual trigger, for when the user asks to compact, clear or summarize the context. The summary is a real model call, so it costs a request and its usage is counted. Detail is lost — that is the point — so the model is told to use it deliberately, and `instruction` steers what to keep. The window the automatic threshold is measured against comes from the `context_window` preference (or `context_window:` for one model), falling back to 128k, and `auto_compact=false` turns the automatic trigger off while leaving this tool. See [the user manual](../user_manual.md#when-the-context-fills-up).