The /compact Command
/compact is a built-in slash command that immediately summarizes the current conversation history. It is useful when you want to free up context window space without starting a new task.
See also Auto-Compact, which describes how Kodik does this automatically as the context limit approaches.
How It Works
Section titled “How It Works”When you type /compact in the chat input:
- The command is handled directly in the request loop — no additional model call is made to analyze the command.
- Kodik immediately summarizes the entire conversation history, keeping no recent user messages (unlike automatic summarization, which preserves the last user message).
- The history is replaced with a pair: a “What did we do so far?” question and a summary response.
- The conversation continues with a freed-up context window.
The summary is generated using the same structured template as automatic summarization (Goal, Progress, Key Decisions, Relevant Files, etc.).
Usage Example
Section titled “Usage Example”If the conversation has accumulated many intermediate steps, failed attempts, or exploratory context, type /compact. Kodik will collapse all of that into a compact summary and you can continue working with the freed-up space.
This is more useful than /newtask when you want to stay in the same conversation and continue the current task rather than starting a fresh one.