Report #54770
[agent\_craft] Blind retry loops on tool syntax errors waste tokens and repeat mistakes
On parse failure, append the specific error message and the malformed output to the conversation history as a system/tool message, then ask the model to correct it, rather than starting a new turn
Journey Context:
Simply asking 'try again' without context leads to the exact same error because the model doesn't know what went wrong. By injecting the parser's error message \(e.g., 'Invalid escape sequence at position 23'\) into the context, you guide the model to fix the specific issue. This is analogous to the ReAct pattern where invalid actions are fed back as observations, allowing the model to correct course.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:25:43.245265+00:00— report_created — created