Core ConceptsContext Management

Context Management

Monitor and manage Claude’s context window effectively.

The Problem

Claude Code has a limited context window. When it fills up:

  • Auto-compact summarizes and loses details
  • /clear wipes everything

Both options lose important context.

The Solution

  1. Monitor context usage with ccstatusline
  2. Document before clearing with /wrapup
  3. Resume after clearing with /catchup

ccstatusline

ccstatusline shows live context usage:

Ctx: 45% | Model: opus | Branch: main

Reading the Status

LevelMeaningAction
0-50%Plenty of roomKeep working
50-70%Getting fullPlan wrap-up point
70-80%Time to wrap upRun /wrapup soon
80%+CriticalRun /wrapup now

Installation

ccstatusline is installed automatically if you select it during setup.

To verify it’s working, check your Claude Code settings:

{
  "statusLine": {
    "enabled": true,
    "command": ["npx", "-y", "ccstatusline"]
  }
}

Document & Clear Workflow

Instead of letting auto-compact destroy context:

1. Work until Ctx: ~80%
2. /wrapup → Saves to CLAUDE.md
3. /clear → Fresh context
4. /catchup → Resume with full memory

What Gets Preserved

ItemWhereSurvives /clear?
Project statusCLAUDE.mdYes
DecisionsRecordsYes
Small choicesRecent DecisionsYes
Chat discussionContextNo

The key insight: External files are your memory, not the context window.

Disable Auto-Compact

⚠️

Auto-compact must be disabled for this workflow to work.

See Disable Auto-Compact for instructions.