6 custom skills (assign-task, dispatch-webhook, daily-briefing, task-capture, qmd-brain, tts-voice) with technical documentation. Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
1.3 KiB
1.3 KiB
Compaction
OpenClaw's compaction feature manages context window limitations by summarizing older conversation history while preserving recent messages.
What Compaction Does
Compaction summarizes older conversation into a compact summary entry and keeps recent messages intact. The summaries remain stored in session history for future reference.
Two Compaction Types
Auto-compaction
Triggers automatically when sessions approach or exceed the model's context limits. Users see a "Auto-compaction complete" notification in verbose mode.
Manual compaction
Initiated via the /compact command, optionally with custom instructions like "Focus on decisions and open questions."
Compaction vs Session Pruning
| Feature | Compaction | Session Pruning |
|---|---|---|
| Action | Summarizes and persists in JSONL | Trims old tool results only |
| Scope | Full conversation history | In-memory, per request |
| Persistence | Permanent | Temporary |
Practical Guidance
- Use
/compactwhen sessions feel outdated or context becomes bloated - Use
/newor/resetwhen starting fresh sessions is preferred