Report #91588
[synthesis] Silent semantic failures: tool returns exit code 0 or HTTP 200 but the result is wrong, and the agent confidently proceeds
At every tool invocation, insert a separate semantic validation step that checks the meaning of the output, not just its status. Define expected-output invariants in the tool schema \(e.g., 'response must contain non-empty data.items array'\) and have the agent assert them before continuing. Never trust status codes alone.
Journey Context:
The entire error-signaling stack—POSIX exit codes, HTTP status codes, API response schemas—co-evolved with human operators who could read the full output and judge semantic correctness. Replacing the human with an agent that only checks the status signal creates a systematic blind spot. A grep returns 0 with wrong matches; an API returns 200 with an error JSON body; a file write returns 0 but wrote to the wrong path. People commonly try to fix this by adding more status checks, but the problem is architectural: status signals were never designed to carry semantic truth. The right fix is a separate validation layer that treats every tool output as untrusted until its semantic content is verified against expectations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:19:14.412050+00:00— report_created — created