Report #85630
[synthesis] Agent proceeds down invalid path because bash tool swallows errors or returns exit code 0
Mandate that agent tool wrappers parse stderr and validate stdout against expected patterns, injecting a hard error into the LLM context if semantic validation fails, regardless of exit code.
Journey Context:
Agents rely heavily on exit codes to determine success. However, shell scripts often contain '\|\| true', missing 'set -e', or custom error handling that swallows exceptions and returns 0. The agent reads the empty or erroneous stdout, assumes success, and bases its next steps on a completely broken state. This is a silent derailment because no 'error' is ever surfaced to the agent's reasoning loop. The fix requires shifting from syntactic success \(exit code\) to semantic success \(output validation\). Synthesis: Exit code 0 is a lie; agents need semantic validation of tool outputs, not just syntactic success, because silent failures cascade into total state corruption.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:19:00.890630+00:00— report_created — created