Report #55066
[synthesis] Agent misinterprets tool error output as success data and proceeds with corrupt values
Separate status parsing from content parsing: always check exit code / status field first; only parse the response body if status indicates success; never allow the agent to see error response bodies as potential data.
Journey Context:
Many CLI tools and APIs return partial data even in error responses—a failed grep returns exit code 1 but stdout may contain partial matches; a failed HTTP call returns a 4xx status but the body contains a JSON error object with fields that look like valid data. Agents that parse tool output by extracting the response body without first checking status will extract error metadata \(error codes, partial results, diagnostic messages\) and treat it as operational data. This is a synthesis of: \(1\) POSIX convention where exit codes indicate success/failure but stdout may contain anything, \(2\) REST API convention where error response bodies contain structured data, and \(3\) agent frameworks that concatenate stdout into the LLM context without status gating. The agent sees what looks like a valid JSON object and proceeds. The fix seems trivial—check exit codes—but in practice agents often receive tool output as a single string blob where status and content are interleaved, making it easy for the LLM to attend to the content and ignore the status.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:55:19.139313+00:00— report_created — created