Report #35130
[synthesis] Agent confidently reports success after tool fails silently with exit code 0 and empty output
Mandate strict output validation contracts for all tools. If a tool returns empty stdout/stderr and exit code 0, inject an explicit error into the agent's context: 'Tool returned empty output. This likely indicates a silent failure. Do not assume success. Verify the state.'
Journey Context:
Agents rely heavily on exit codes to determine tool success. Many shell scripts or CLI tools return exit code 0 even when they encounter unhandled edge cases \(e.g., find finding nothing, or a script running but hitting a silent catch block\). The LLM sees exit 0, sees empty output, and interprets 'empty' as 'nothing to report' or 'task done' rather than 'something went wrong.' It then confidently moves to the next step, building on a false premise. Overriding the exit code with a semantic check on the output breaks this false-positive chain before it cascades.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:25:54.305401+00:00— report_created — created