`/compress-session` — distil, don't truncate
Auto-compaction is lossy: it keeps recent turns and drops earlier ones, with no preservation of what was decided mid-session. /compress-session is the distil-not-truncate alternative — produce a structured note that the next session can resume from in under a minute.
Why this skill exists
Drew Breunig's "How Long Contexts Fail" identifies four failure modes for long-context sessions:
- Poisoning — early hallucinated content gets quoted by later turns, compounding the error.
- Distraction — irrelevant earlier context dilutes the model's attention to current task.
- Confusion — contradicted facts pile up; the model doesn't know which to trust.
- Clash — multiple plans, decisions, or specs accumulate without explicit reconciliation.
The template's 200-line MEMORY.md cap defends against distraction. The plan-on-disk convention defends against clash. Nothing currently defends against poisoning or directly against confusion — that's what this skill is for.
Distinction from `/checkpoint`
| | /checkpoint | /compress-session |
|---|---|---|
| When | Explicit stop-point (end of working session, before model switch, before collaborator handoff) | Forced — context is about to auto-compact, or the conversation has accumulated enough noise that distillation pays for itself |
| What's preserved | Active plan, decisions, file pointers, next 1–3 actions | Same, plus an explicit "discarded as noise" line so the next session knows what was intentionally not kept |
| Output location | quality_reports/checkpoints/YYYY-MM-DD_<slug>.md | quality_reports/session_logs/YYYY-MM-DD_compression_<slug>.md |
| Triggering | User-invoked at a natural pause | User-invoked when context fatigue shows, OR prompted by the optional PreCompact reminder hook below (not wired by default) |
| Memory updates | Optional auto-proposal of [LEARN] entries | Proposes 0–3 [LEARN] entries — distillation is when generalizable lessons surface, and a quiet session proposes none |
Both skills are companions to the narrative session-log workflow at quality_reports/session_logs/. None replaces the others.
When to use
- Context is approaching auto-compact.
/context-statusreports approaching threshold. - A long pipeline has accumulated noise. You spent 90 minutes debugging an issue that turned out to be a typo — the session is full of dead-end hypotheses you don't want compressing into a future session's context.
- Mid-plan handoff. Different model, different machine, different collaborator.
- PreCompact reminder fired. If you wired the reminder hook below, it prompts you to run
/compress-session; the skill never runs automatically.
When NOT to use
- For a quick stop-point. Use
/checkpoint. - For narrative session logging. That happens incrementally via the Stop hook (session-logging.md); no skill needed.
- For starting a fresh session. Use
/clear./compress-sessionis for preserving state, not for resetting.
Steps
Step 1: Identify the session
The current conversation is the source. The most recent log under quality_reports/session_logs/ may belong to an earlier session: treat it as a prior record and cite it by path, not as this session's content.
Optionally use $ARGUMENTS as a topic slug for the output filename.
Step 2: Distil into structured sections
Write only what this session established. The next session is handed this file automatically (