Reading an AI Agent Build Log and Fixing a Failed Build
How to find the step where a build went wrong.
Hello. In this lesson I will take you through 3 ideas, one at a time.
Why it matters: How to find the step where a build went wrong. After each idea I will ask you one quick question.
In this lessonFollows you as you read
What the log should hold
The short version: Every agent step should record what it read, what it wrote, which tools it called, how long it took and whether its checks passed.
Every agent step should record what it read, what it wrote, which tools it called, how long it took and whether its checks passed. Without this you cannot tell a wrong plan from wrong code.
Ask for logs you can read without tooling: a list of steps with inputs, outputs and results. Fancy traces help engineers, but a plain step list lets a project manager see where things stand.
A checkout screen is broken. Where should you look first?
Tracing a failure backwards
The short version: When a build is wrong, start from the failure and walk back.
When a build is wrong, start from the failure and walk back. A broken checkout screen may come from the builder, but often the cause is earlier: the plan missed a state, or the data agent named a field differently from the designer.
Fix the earliest wrong output and rerun from there. Patching the last step leaves the wrong plan in place, and the same fault returns in the next feature.
How does an agent crew improve between builds?
Turning failures into rules
The short version: Each failure is an instruction you have not written yet.
Each failure is an instruction you have not written yet. If the builder invented an API that does not exist, add a rule: only call endpoints listed in the data file. If the tester missed empty states, add them to the test template.
Keep these rules in a shared file that every agent reads. Over a few builds the crew improves, not because the model changed but because the instructions did.
- Logs record inputs, outputs, tools and results
- Trace back to the earliest wrong output
- Rerun from the fix, do not patch the end
- Every failure becomes a written rule
Take a bug from a past project. Write the chain of decisions that led to it, mark the earliest wrong one, and write the one-line rule that would have prevented it.
Mark it complete to track your progress on this device.