Report #85633
[synthesis] Agent proceeds after piped command failure masks exit code
Always inject \`set -o pipefail\` into shell command prefixes or check \`$\{PIPESTATUS\[@\]\}\`; configure agent tool wrappers to propagate non-zero exit codes from any pipeline stage, not just the last command.
Journey Context:
When agents execute piped commands like \`cat file \| grep pattern \| wc -l\`, only the last command's exit code is returned by default. If \`cat\` fails on a missing file but \`wc -l\` succeeds on empty stdin returning 0, the agent sees exit code 0 and proceeds confidently. The downstream step operates on empty or wrong data, and by step 7 the corruption is baked into persisted state. Agents rarely think to add pipefail because they pattern-match on 'exit code 0 = success.' The tradeoff: pipefail can surface intermediate failures in pipelines where some are acceptable, but for agent workflows where every stage must be correct, strict propagation is essential. Many agent frameworks don't expose PIPESTATUS by default, making this a silent trap.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:19:18.661462+00:00— report_created — created