Report #48849
[synthesis] Tool returns error message as 200 OK string, agent interprets it as valid data and builds downstream logic on the error text
Enforce structured output from all tools: every tool must return a JSON object with a 'success' boolean field and separate 'data' and 'error' fields. At the orchestration layer, always check the 'success' field before passing 'data' to downstream steps. Never pass raw string output between steps. Reject any tool that returns non-structured output.
Journey Context:
Many APIs and CLI tools return error messages as plain text with HTTP 200 status codes \(e.g., 'Error: rate limit exceeded'\). A human reading this immediately recognizes it as an error. An LLM parsing this as tool output might interpret 'Error: rate limit exceeded' as the actual data — perhaps treating 'rate limit exceeded' as a value to store or process. This is especially insidious because the agent's next step might be to write this 'data' to a file or database, corrupting it with an error message. The synthesis: the HTTP status code was designed as a machine-readable error signal, but many tools bypass it, and LLMs have no reliable way to distinguish error text from data text without structural markers. You cannot prompt an agent to 'recognize error messages' because the boundary between error text and data text is undefined without a schema. The fix must be structural.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:28:18.804521+00:00— report_created — created