You've learned why context matters (Lesson 1), how the attention budget works (Lesson 2), and why position affects recall (Lesson 3). You've audited your CLAUDE.md for signal vs noise (Lesson 4) and explored getting tacit knowledge in and out (Lesson 5).
Now comes the operational question: What do you actually DO when context becomes a problem?
Whether you're a lawyer deep into contract review, a marketer building a campaign, a researcher synthesizing literature, or a developer debugging code—the principles are identical. Context fills up. Quality degrades. You need to decide: reset or compress?
You've seen /clear and /compact in Chapter 3. You know they exist. But knowing commands isn't the same as knowing strategy. Should you clear now or compact? Should you preserve this tangent or let it go? Is 65% utilization fine or concerning?
This lesson gives you the decision frameworks for context lifecycle management—when to reset, when to compress, how to customize compaction, and how to persist work across sessions.
In Lesson 2, you learned that quality holds steady until roughly 70% utilization, then drops. But "monitor until 70%" isn't actionable. You need zones with specific actions.
Why these thresholds?
Checking your zone:
Output:
44% = Green zone. Work freely.
74% = Orange zone. Compact NOW.
Both commands reduce context. They're not interchangeable. The wrong choice costs you either work (clearing when you should compact) or quality (compacting poisoned context).
Use /clear when:
Use /compact when:
The Decision Tree:
Context Poisoning Examples:
Context poisoning happens in every professional domain. Here's what it looks like:
Legal Professional: You started analyzing Contract A for liability clauses. Midway through, the client pivoted to reviewing Contract B instead. Now your context is full of Contract A analysis, clause references, and risk assessments that actively confuse work on Contract B.
Compacting this preserves the confusion. Clear instead.
Marketing Professional: You've been iterating on campaign messaging for an hour. You tried three positioning angles before finding one that works. The context is full of those rejected angles.
Compacting this might preserve "we tried lifestyle messaging and it didn't resonate" (useful) but also preserves the detailed exploration of that angle (noise). Clear might be cleaner.
Research Professional: You've been synthesizing literature on your topic for 2 hours. You've identified 15 key themes, established methodological criteria, and noted 8 seminal papers. Context hit 75%.
Compact this. You want those decisions preserved.
Business Analyst: You started mapping Process A. Stakeholder feedback redirected you to Process B. Your context contains detailed flowcharts and edge cases for the wrong process.
Compacting this preserves the wrong mental model. Clear instead.
Developer: You've been working on the same feature for 2 hours. You've made 15 good decisions about architecture, identified 8 relevant files, and established constraints. Context hit 75%.
Compact this. You want those decisions preserved.
When you run /compact, Claude:
The result is a new session that "remembers" the important parts but has room for more work.
Without custom instructions, compaction uses Claude's judgment about what's important. This is often good but sometimes misses domain-specific priorities.
With custom instructions, you guide what gets preserved.
The power move is telling Claude exactly what to preserve. Here are examples across professional domains:
Legal:
Marketing:
Research:
Consulting:
Development:
Structure for custom compaction:
Configurable in CLAUDE.md:
You can encode your default compaction priorities. Here's a domain-neutral template:
This becomes your default compaction behavior. Claude will follow these priorities unless you override with specific instructions.
Context lifecycle isn't just within sessions—it's across them. Sometimes you close the terminal and need to return.
--continue example:
Output (varies by your work):
--resume example:
Output (example showing multi-project work):
/resume (in-session) example:
Output:
Conversations have a viability window. After roughly 3-4 days, a session typically becomes un-resumable—too many tangents, too much accumulated drift, too many implicit assumptions that no longer hold.
Signs a session has expired:
The rule: If a session is more than 3 days old, start fresh instead of resuming. Use the old session as reference (read the summary) but don't continue in it.
Exception: Sessions with excellent progress files (Lesson 7) can last longer because the state is externalized, not trapped in conversation history.
The safest context lifecycle pattern combines compaction with externalizing your progress. For developers, this means Git commits. For other professionals, it means saving documents, notes, or deliverables.
Why checkpoints matter:
The pattern across domains:
Legal Professional:
Marketing Professional:
Researcher:
Developer:
This is Principle 5 (Persisting State in Files) applied to context lifecycle. The checkpoint IS the externalized progress. Context can be cleared or compacted because the real progress is saved outside the conversation.
Objective: Build awareness of context utilization patterns in your actual workflow.
Choose Your Professional Context:
Pick the scenario that matches your work:
What you'll need:
Protocol:
Step 1: Create Your Monitoring Log
Create a simple log file:
Step 2: Establish Baseline
Start a fresh session and check initial utilization:
Output:
Log it: Message 0, 12,456 tokens, 6%, Green, Starting
Step 3: Work and Monitor
Every 10 messages (or every 5-10 minutes), run /context and log:
Sample log progressions by domain:
Legal Professional (Contract Review):
Marketing Professional (Campaign Brief):
Researcher (Literature Synthesis):
Step 4: Identify Your Pattern
After the session, analyze your log:
Step 5: Calculate Your Compaction Cadence
Based on your growth rate, calculate:
This is your compaction cadence—roughly how many messages before you need to compact.
Deliverable: A completed monitoring log showing your typical context growth pattern, with calculated compaction cadence for your workflow.
Expected Finding: Most professionals discover they hit Yellow zone faster than expected. The first time you see context jump 20% from loading a single large document or generating a detailed analysis, you'll understand why monitoring matters.
This lesson gave you the operational framework for context lifecycle management—applicable whether you're reviewing contracts, building campaigns, synthesizing research, or writing code:
The next lesson (Long-Horizon Work) builds on this foundation. You'll learn how to structure work that spans multiple sessions, using progress files and session architecture to maintain continuity beyond what context alone can provide.
What you're learning: Context awareness in practice. Before you can make good /clear vs /compact decisions, you need to accurately assess your current state. This prompt practices zone identification and context triage—the foundation of lifecycle management.
Choose the scenario that matches your domain:
For Legal Professionals:
For Marketing Professionals:
For Researchers:
For Consultants:
For Developers:
What you're learning: Decision framework application. This prompt gives you practice with the /clear vs /compact decision tree using a realistic scenario from your domain. Claude's reasoning will model the analysis process you should internalize.
What you're learning: Compaction instruction crafting. Effective compaction requires understanding both what you want to keep AND what will inevitably be lost. This prompt practices creating precise compaction instructions while acknowledging the tradeoffs—preparing you to use external documentation (progress files, saved notes, commits) as backup.