Report #53282
[synthesis] Agents mutate global environment state in early steps then forget the mutation causing downstream script failures
Execute all tool-generated scripts in isolated subprocesses \(e.g., python -c or bash -c\) rather than in a persistent REPL, ensuring no environmental state \(like os.environ or sys.path\) bleeds between steps.
Journey Context:
In step 1, an agent modifies \`os.environ\['API\_URL'\]\` to point to a staging server. In step 5, it writes a production deployment script that reads \`API\_URL\`. The script fails because it points to staging. The agent reads the step 5 script, sees no hardcoded staging URL, and assumes the environment variable is externally misconfigured. It attempts to fix it by modifying external CI/CD variables, rather than realizing its own step 1 mutation leaked into the step 5 execution context. The agent blames the infrastructure instead of its own stateful side-effect.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:55:44.198354+00:00— report_created — created