forked from Selig/openclaw-skill
Initial commit: OpenClaw Skill Collection
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.
This commit is contained in:
36
openclaw-knowhow-skill/docs/reference/concepts/compaction.md
Normal file
36
openclaw-knowhow-skill/docs/reference/concepts/compaction.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# 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 `/compact` when sessions feel outdated or context becomes bloated
|
||||
- Use `/new` or `/reset` when starting fresh sessions is preferred
|
||||
|
||||
## Related Documentation
|
||||
|
||||
- [Session Management](/concepts/session)
|
||||
- [Session Pruning](/concepts/session-pruning)
|
||||
- [Context](/concepts/context)
|
||||
Reference in New Issue
Block a user