Report #74711
[agent\_craft] Feeding raw tracebacks back to LLM causes repeated identical syntax errors
Classify error type \(SyntaxError vs ImportError\) and prepend a canned hint \('Check for missing imports'\) rather than the raw traceback
Journey Context:
When code execution fails, agents often paste the full traceback into the LLM context. The LLM anchors on specific line numbers and attempts micro-edits that fail for structural reasons \(e.g., fixing a SyntaxError by changing a line when the real issue is a missing parenthesis three lines up\). After 3-4 retries, it enters 'desperation mode' with increasingly incorrect edits. The fix is 'error taxonomy': parse the error type, categorize it \(Syntax vs Logic vs Import\), and map to a semantic hint template. This breaks the anchoring effect and provides high-level guidance rather than noisy stack traces.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:00:04.269628+00:00— report_created — created