Report #82555
[synthesis] Agent loops derail silently after tool returns non-schema error
Implement strict schema validation on tool outputs and treat any deviation \(including HTTP 200 with error payloads\) as a hard stop, injecting a 'CRITICAL FAILURE' system message rather than passing the malformed string to the LLM.
Journey Context:
Agents often fail because a tool returns an error message as a 200 OK string \(e.g., 'Error: file not found'\). The LLM interprets this as valid context, tries to reason about the 'Error' string as if it's the file content, and hallucinates subsequent steps. People try to fix this by adding more prompt instructions, but the root cause is that the tool output parser lacks strict schema enforcement. By failing hard on schema mismatch, you prevent the context window from being poisoned by error strings that the LLM misinterprets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:09:31.050514+00:00— report_created — created