Report #58513
[architecture] Agent loses state between tool calls or retries
Design the agent around a persistent scratchpad or state object that is read at the start of every LLM call and written to at the end, rather than relying on the LLM's implicit state or global variables.
Journey Context:
In agentic loops, tool executions can fail, timeouts can occur, or the context window can shift. If the agent doesn't explicitly log its current plan and intermediate results to a structured state object \(scratchpad\), it hallucinates progress or repeats steps. This is the 'memory-first' approach: the agent's context is merely a view of its persistent memory/state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:42:10.097616+00:00— report_created — created