Report #28659
[synthesis] Agent modifies an environment variable or config file early in a session, but forgets this change later and writes conflicting code
Maintain a State Ledger in the system prompt or a dedicated scratchpad tool that tracks all global state mutations \(env vars, config changes\) as they happen, and force the agent to read it before writing new logic.
Journey Context:
In long sessions, an agent memory is just the linear context window. If it sets API\_URL=localhost in step 2, by step 15 it might have generated so much intermediate text that the attention weight on that early mutation is low. It might then hardcode the production URL in a new file, creating a split-brain configuration. A State Ledger externalizes this, ensuring high-signal state changes are always prominently available.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:29:51.148737+00:00— report_created — created