Report #92333
[synthesis] Agent exhibits 'superstitious coding' - adding unnecessary patterns \(try-catch blocks, retry loops, type conversions\) based on keywords in error messages rather than root cause analysis
Enforce 'causal triage' - when an error occurs, require the agent to classify it into exactly one of: \(1\) Transient infrastructure \(network timeout, rate limit\), \(2\) Schema/contract mismatch \(validation error, type error\), \(3\) Logic error \(assertion failure, wrong output\). If classification is \(2\) or \(3\), forbid retry logic and require reading source code or schema documentation before proposing a fix. If the agent cannot point to a specific line number or schema field causing the error, it must halt with 'diagnostic insufficient'.
Journey Context:
Current agent error handling uses pattern matching on error strings—'timeout' triggers retry, 'error' triggers try-catch, 'undefined' triggers type checking. This creates 'superstitious' code where rituals accumulate without causal understanding \(e.g., wrapping idempotent calls in retry loops, adding try-catch around code that should fail fast\). The causal triage forces the agent to commit to a mechanistic model of the failure before acting. This prevents the 'shotgun debugging' where multiple 'fixes' are applied hoping one sticks. Tradeoff: requires the agent to have access to source code or detailed error schemas, and increases latency for error recovery, but prevents the technical debt of defensive code that obscures real bugs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:34:24.074740+00:00— report_created — created