Report #77313
[counterintuitive] Giving an AI agent an error log and the codebase is the fastest way to fix a bug
Provide the AI with the error log and explicitly require it to write a failing test that reproduces the bug \*before\* proposing a code fix.
Journey Context:
AI sees a NullPointerException in the log and adds a null check exactly where it crashed. Humans look at the log and ask 'why was this null in the first place?'. AI systematically overfits to patching the symptom because it lacks a causal mental model of the runtime execution. Forcing the AI to write a reproducing test first forces it to model the causal chain, preventing bug-hiding patches.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:22:16.762655+00:00— report_created — created