5.4 — Codebase Exploration & Context Degradation
CCAR-F Domain 5 · Task 5.4
What You Need to Know
Context degradation = model loses grip on earlier specific findings (refers to "typical patterns" instead of class names). It is an attention quality problem, not a token-limit problem. Larger context windows do not fix it.
Primary Mitigations
- Scratchpad files — write key findings outside conversation context; refer back later
- Subagent delegation — isolate verbose exploration in separate contexts; coordinator keeps only summaries
- Summary injection between phases — inject Phase 1 summary into Phase 2 subagent prompts (prevents cold start)
/compact— use proactively during extended sessions to protect context quality- Structured state manifests — for crash recovery; load on resume and inject into agent prompts
Key Concept: Context degradation is lost grip on specific findings, not a token limit problem. Scratchpad files keep findings outside the context. Subagents isolate verbose exploration. Manifests prevent lost progress.
Exam Traps
- Increasing the context window to solve degradation
- Expecting next-phase subagents to inherit phase-one history
- Restarting a session without saving state
- Using
/compactonly when hitting limits
Check your understanding
Practice Scenario
🔒 This practice scenario is part of Skillmarked Pro
The lessons stay free. Pro unlocks the other 23 CCAR-F practice scenarios and the 60-question timed mock exam, plus everything for every other exam.
Cancel anytime. Or €199 a year, which saves 17%.
Not sure yet? Try 10 free mock exam questions.
Already Pro? Log in.
Sources
- Best practices for Claude Code, Claude Code Docs
- Set up Claude Code in a monorepo or large codebase, Claude Code Docs
- Create custom subagents, Claude Code Docs
- Effective context engineering for AI agents, Anthropic