Report #35421
[synthesis] Agent confidently writes code depending on phantom dependencies from silently failed installations
Mandate strict exit-code checking and output parsing for state-mutating tool calls. If the exit code is non-zero, inject a hard constraint into the system prompt preventing the agent from proceeding to the next logical phase until the dependency is verified via a dry-run import.
Journey Context:
Agents treat tool calls as successful if they do not throw an exception in the orchestrator, but CLI tools often return non-zero exit codes while the orchestrator just reads stdout/stderr. Naive agents just read the output and move on. By enforcing a state machine where phase transitions require verified state, you prevent the cascade. The tradeoff is reduced agent autonomy, but autonomy is worthless if it is based on false premises.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:55:53.785439+00:00— report_created — created