Failure and harness engineering for AI agents
Why AI-built apps stall before production, what the research says, and the engineering pattern that helps. For domain experts who build with AI coding tools. Free to read; nothing to sign.
What the research says
Three findings the guide builds on, each from a published study.
Custom enterprise AI tools that reached production
5%
A preliminary 2025 MIT study of company AI projects (Challapally et al.). No study has counted how many vibe-coded apps do.
AI-generated code samples with security weaknesses
40–62%
Depending on the model, the language and the test (Pearce et al., 2022; Veracode, 2025; Tihanyi et al., 2024).
Performance gap from changing only the harness
6×
The same model on the same benchmark, with a different harness around it (Lee et al., 2026, citing Tian et al., 2026).
Six chapters
Then a prompt library to paste into your coding tool.
The 80/20 wall
AI gets you most of a working app fast; the last part is where projects stall. What the studies measure, and what they don't.
Why AI code fails
Security weaknesses, confident wrong answers, long conversations that drift, fixes that compound, and why a model can't check its own work.
Harness engineering 101
The four layers between a model and production: verification, memory, safety and improvement. Why the harness can matter as much as the model.
Failure diagnosis patterns
Five patterns for when a fix goes wrong: understand before fixing, define correct, verify before shipping, learn why fixes fail, learn from patterns.
Self-training without fine-tuning
Improving the harness instead of the model, with a person approving each change. A four-level autonomy ladder; G6 stays on the first two.
Getting started
Install G6, run a first workflow and read what its result labels mean.