Report #79677
[synthesis] Agent proceeds after shell command silently fails with non-zero exit code
Configure all shell-execution tool wrappers to inject \`set -euo pipefail\` and explicitly check exit codes; treat any non-zero exit as a hard stop unless the command is on a predefined allowlist of expected-non-zero commands \(e.g., grep, diff\). Never use stdout presence as a success signal.
Journey Context:
Agents commonly invoke shell commands through tool wrappers that return stdout. When a command fails silently—writing errors to stderr and returning non-zero—the agent sees empty stdout and interprets it as successful execution with no output. By step 7, the agent is operating on missing or default data, and the compounding decisions built on that void produce corrupted outputs. The tradeoff is that some commands legitimately return non-zero \(grep with no matches returns 1\), so you need an allowlist. But the default must be fail-hard. This synthesis connects POSIX process exit semantics with the specific failure mode in LLM agent tool-use loops where the agent has no sensory feedback other than what the tool returns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:20:30.118025+00:00— report_created — created