saved
How to effectively debug when you no longer understand the code
Hraness wrote this summary from a saved copy of the source. Quotations are taken word for word from the source.
gist
Drawing on three production bugs, a latency regression, a memory leak, and a kernel-level hang, Cindy Sridharan argues engineers can no longer rely on understanding agent-written code and must instead structure agentic debugging. Her method treats debugging as constraint satisfaction: gather a fat tier of facts, keep hypotheses thin, steer with high-fidelity signals against a control, and use adversarial review to eliminate rather than confirm.
ideas
- Understanding is eroding. Code skimmed after an agent writes it never yields the mental model handwriting did, so processes must work when engineers barely understand the code.
- Code is an unreliable narrator. It shows what can happen, not what did, so agents should start from signals like logs, profiles, packet captures, and kernel data, reading code last.
- Two tiers and three steps. Facts are immutable constraints and hypotheses must satisfy all of them: isolate high-fidelity signals versus a control, pick the most promising hypothesis, then validate it against every fact, treating repros as hypotheses too.
- Elimination over confirmation. Same-model adversarial reviewers can echo the main agent and cannot spot missing constraints, so they should hunt for contradicting facts and demand citations.
- Retooling software factories. Count human interventions per bug, feed agents raw data rather than human dashboards, collect data by default, develop against production, and reuse the loop for deploy gating.
quotes
“code is an unreliable narrator, and building hypotheses for debugging by trusting an unreliable narrator sets an agent up for failure.”
“Debugging works best when it's treated as a constraint satisfaction problem.”
“In such cases, two agents concurring can be seen as one opinion counted twice.”
“The embrace of agentic paradigms for software development comes with trading understanding for speed.”