Report #37900
[counterintuitive] Providing the exact error stack trace is the optimal prompt for AI debugging
Provide the stack trace, but explicitly prompt the AI to identify the \*root cause\* and forbid it from suggesting patches that merely suppress the error \(like adding a try-catch or null check at the crash site\).
Journey Context:
Humans read a stack trace and intuitively trace back to the origin. LLMs have a strong bias toward 'patching the symptom'—the exact line where the exception was thrown. Because the error line is the most salient part of the prompt, the AI's attention mechanism anchors there, proposing a local fix rather than fixing the upstream race condition or data corruption that caused the null. This leads to latent bugs that are harder to trace later.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:05:47.132878+00:00— report_created — created