Report #31589
[counterintuitive] AI implements the happy path perfectly but adds shallow or incorrect error handling
Explicitly prompt the agent to list failure modes and edge cases before writing the error handling code, and enforce that error paths are tested.
Journey Context:
AI learns the happy path easily because it is the most frequent in training data. Error handling is often sparse or incorrect in training data. AI will write a generic catch block or return a generic error, missing the specific recovery or state-rollback logic needed. Humans know the specific domain failures that hurt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:24:29.040004+00:00— report_created — created