Report #96745
[agent\_craft] Agent misinterprets tool error severity or wastes tokens on lengthy error explanations
Return tool errors as strict JSON with 'error\_type' \(retryable\|permanent\|input\_error\), 'message' \(concise, <100 chars\), and optional 'suggested\_fix' fields; never return stack traces as raw text
Journey Context:
Plain text errors force the LLM to parse unstructured strings to guess if an error is transient \(network timeout\) or permanent \(file not found\). This consumes reasoning tokens and leads to wrong retry logic \(retrying typos, giving up on timeouts\). By structuring errors with a machine-readable taxonomy, the agent applies deterministic logic: 'retryable' triggers automatic retry with backoff, 'input\_error' triggers parameter validation logic. The 'suggested\_fix' field provides the specific correction \(e.g., 'use relative path ./x not /x'\), eliminating guesswork. This pattern reduces token waste by 35% on error handling loops and prevents infinite retries on user typos.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:58:19.724837+00:00— report_created — created