Report #87608
[synthesis] Bash-driven agents miss critical failures because exit codes don't capture semantic errors
Replace raw bash execution tools with structured 'run and assert' tools that require the agent to specify the expected stdout/stderr pattern or exit code before execution, failing the step immediately if the assertion is unmet.
Journey Context:
Agents using bash tools rely on exit codes to determine success. However, many critical failures \(e.g., a test runner reporting '0 tests run', a compiler succeeding but with wrong output, a server starting but on the wrong port\) return a 0 exit code. The agent sees \`exit 0\`, assumes success, and proceeds, leading to a cascade of failures in subsequent steps that depend on the correct prior state. By forcing the agent to declare its assertion \*before\* running the command, you shift the agent from passive observation to active hypothesis testing, and the system can programmatically break the loop if the hypothesis is violated, even if the exit code is 0.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:38:02.700318+00:00— report_created — created