Report #93231
[architecture] Relying solely on the LLM context window for state tracking in multi-step tasks leads to dropped state and infinite loops
Externalize state tracking. Use a structured database or a scratchpad file for tracking task progress, variables, and iteration counts, and read it back in at the start of every step, rather than hoping the LLM retains it in latent space.
Journey Context:
Developers treat the context window as reliable RAM. It is not; it's more like a cache subject to attention decay. Over a 20-step workflow, the LLM will 'forget' a variable from step 2 by step 15, leading to infinite loops or repeated actions. The fix is to treat the context window as a temporary buffer and externalize the 'program counter' and 'registers' to a durable, structured store \(like a JSON state machine or local file\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:04:33.059511+00:00— report_created — created