Report #40439
[agent\_craft] Agent forgets the file path or variable name returned by a previous tool call after multiple steps
Maintain a 'scratchpad' or 'state dict' at the top of the context that gets updated with critical artifacts \(file paths, key variable names, API endpoints\) after every tool execution.
Journey Context:
Agents rely on the sliding window of conversation history. If a tool returns a path at step 2, and steps 3-8 involve editing other files, the path gets pushed up and eventually truncated or ignored due to attention decay. A persistent scratchpad ensures critical state variables are always in the immediate attention horizon.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:20:58.263706+00:00— report_created — created