Context Management & Reliability
Make the agent survive when the diff is huge.
6 lessons 3 phases advanced
Get started
Signed in as your account.
why this workshop
who it's for.
Developers who finished W4 and want to harden the agent to survive huge PRs and show its work when it can't.
exam coverage
Maps to Domain 5 (Context Management & Reliability), 15% of the CCA – Foundations exam.
what you'll build
what you walk away with.
- 01 A forensic baseline log (logs/baseline-degradation.md) categorizing what degrades first on a ~1500-line diff — token window, coherence, or ranking.
- 02 A progressive summarizer (src/agent/summarize.ts) that keeps imports/signatures verbatim with line-range anchors — plus a measured answer to whether the planted bug survived it.
- 03 A prompt layout module (src/agent/prompt-layout.ts) that puts key findings first and the diff last, backed by a three-placement lost-in-the-middle experiment.
- 04 An escalation handler (src/agent/escalate.ts) that emits needs-human findings carrying the exact question for a human — plus the additive needs-human extension to FindingSchema's severity enum.
- 05 Provenance on every finding (file, line, toolCallId, sourceText) and a dropped-finding log where every drop carries a reason — duplicate, critic, or worker failure — plus a crash test proving what survives a killed run.
- 06 A terminal review UI (src/cli/review-ui.ts): keep/drop/comment per finding, confidence on display, a min-confidence filter, and a stratified sample mode for huge runs.
curriculum
6 lessons across 3 phases.
phase A · Diagnosing degradation 2 lessons
- 01 Inject a Failure
- 02 Progressive Summarization
phase B · Context control 2 lessons
- 03 Context Positioning
- 04 Escalation Patterns
phase C · Transparency 2 lessons
- 05 Error Propagation & Provenance
- 06 Human Review Surface
prerequisites
what you need before you start.
- Completed W4 (or equivalent)
- The workshop reads src/agent/{orchestrator,worker,aggregator,hooks,sessions}.ts — all must be present.
- Node.js 22+
- Same stack as W1–W4 — pnpm workspaces, tsx, TypeScript.
start
how to start.
Once Claude Code is set up, tell it “start the context reliability workshop” and it clones the project and queues the first lesson.
New here? The
getting-started guide
walks you through installing the lwc CLI and the Claude Code
plugin once — everything you need before that line works.
the series