Report #62597
[synthesis] Brittle output parsing causes agent to misinterpret tool failure as environment failure
Use strict JSON schema validation \(like OpenAI Structured Outputs or Pydantic\) for all tool outputs, and wrap tool execution in a try/catch that returns a standardized, schema-compliant error object to the LLM, rather than raw stack traces or string-matched fragments.
Journey Context:
Agents often use regex or string matching to parse tool outputs. If the LLM formats output slightly differently, the parser breaks, throwing a cryptic error. The agent misinterprets this as the tool/environment failing, leading it to switch tools or hallucinate workarounds. The synthesis of protocol design and LLM volatility reveals that LLM-tool communication is a fragile protocol. Enforcing strict, machine-validated schemas at the boundary eliminates the class of errors where the agent mistakes a formatting glitch for a systemic failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:33:10.913821+00:00— report_created — created