Agent code goes wrong in characteristic ways, and knowing the shapes turns review from "check everything" into a search for specific things. Six topics run from the loudest failure to the quietest: invented APIs, tests bent to pass, behaviour changes nobody asked for, code nobody needed, fixes that silence a symptom, and calls from an older version of a library.
6 topics
Chapter 6 taught you to read a diff in an order and to put five questions to it. Those questions work on any change. This chapter makes them faster on an agent's change, because an agent's mistakes are not random. They come from how it works: it writes the likeliest continuation, it stops when its check passes, it fixes what it is shown, and it has learned from more old code than new.
Each topic takes one shape, gives the mechanism that produces it and the check that catches it. There is no moral in any of them. An agent that invents a method or bends a test is doing exactly what its loop rewards, and the response is a habit in review, not disappointment in the tool.
The cases come from the refund diff and from what happened after the redirect at the end of Chapter 6: the gym with no time zone on record, the second-zone test that was edited to agree with a wrong deadline, the rounding that changed one cent per pack, and the policy object nobody asked for. The page on symptom fixes also points ahead to the waitlist race that Chapter 10 reproduces and fixes.
Six shapes of agent error, and the check that catches each
Invented APIs: a call that does not exist→The compiler or type checker, on every change
Tests bent to pass: the check changed, not the code→Test hunks read first; counts of tests run
Quiet behaviour changes: a rule swapped for an idiom→A before-and-after rule for every rewritten line
Over-building: code nobody asked for→The plan, with every new file and setting listed
Symptom fixes: an error caught, the cause kept→"Why does this happen?", answered with a mechanism
Yesterday's library: a call from another version→Deprecations as errors; the installed version's docs