Phase 4: Harness Engineering · 45 min · Claude Code · Python
Feedback Loops and Self-Correction
The fix depends entirely on which category the failure actually is — 'switch to a better model' doesn't repair a missing document.
Real-world application: Classifying failures by category (context, model, tool, spec, environment) before proposing a fix demonstrates the same diagnostic discipline this course has built since the sycophancy and debugging lessons — applied here at the system level instead of a single bug.
What you will learn
- Classify an agent failure into one of five categories: context, model, tool, spec, environment
- Explain why misclassifying a failure's category leads to a fix that doesn't address the real cause
- Describe the outer-loop calibration pattern: monitoring failure patterns over time to adjust the harness itself
- Build a failure classifier and outer-loop calibrator that recommends a harness change from repeated failure patterns
Introduction
Feedback Loops and Self-Correction
Objective
Classify a log of failure events into five categories and implement an outer loop that recommends a harness-level fix when a category pattern repeats past a threshold.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Problem, The Concept, Build, Check Yourself, Key Terms & Next — plus a hands-on lab, quiz, and project artifact.
Create a free account — the opening phases of 29 of 35 courses are free, no credit card.
Browse all courses · View pricing · DeVenture Academy