From b3ea7714f5cb048b67e9914c5b4e2c82bc8570ba Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sun, 8 Mar 2026 17:21:15 -0700 Subject: [PATCH] docs: add dedicated /compress command documentation Add a detailed section for /compress in the CLI Commands Reference, explaining what it does, when to use it, requirements, and output format. Previously only had a one-line table entry. --- website/docs/reference/cli-commands.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md index 7f03f50a5..3613e97a7 100644 --- a/website/docs/reference/cli-commands.md +++ b/website/docs/reference/cli-commands.md @@ -160,6 +160,22 @@ Type `/` in the interactive CLI to see an autocomplete dropdown. | `/usage` | Show token usage for this session | | `/insights [--days N]` | Show usage insights and analytics (last 30 days) | +#### /compress + +Manually triggers context compression on the current conversation. This summarizes middle turns of the conversation while preserving the first 3 and last 4 turns, significantly reducing token count. Useful when: + +- The conversation is getting long and you want to reduce costs +- You're approaching the model's context limit +- You want to continue the conversation without starting fresh + +Requirements: at least 4 messages in the conversation. The configured model (or `compression.summary_model` from config) is used to generate the summary. After compression, the session continues seamlessly with the compressed history. + +Reports the result as: `Compressed: X → Y messages, ~N → ~M tokens`. + +:::tip +Compression also happens automatically when approaching context limits (configurable via `compression.threshold` in `config.yaml`). Use `/compress` when you want to trigger it early. +::: + ### Media & Input | Command | Description |