Report #85977
[synthesis] Agent produces different results when run step-by-step vs automated due to shared mutable state between steps
Treat each step as a pure function; deep-copy all context and state between steps; never allow in-place modification of shared context objects
Journey Context:
Developers often reuse context dictionaries or objects across steps for efficiency. The synthesis reveals that when step 2 modifies a list or dict that step 1 created, step 3 sees corrupted history. This is subtle because the code works \(no crashes\) but reasoning drifts deterministically based on execution path. Functional immutability is the only safe pattern—any shared mutable state creates non-determinism between interactive and batch execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:54:08.733773+00:00— report_created — created