Report #6330
[agent\_craft] Agent forgets the primary system instructions after a long sequence of tool calls and observations
Place the core instructions and current task objective at the END of the context window \(recency bias\), or periodically inject a 'reminder' of the primary goal into the tool call responses.
Journey Context:
Due to the attention mechanism's recency bias, instructions placed at the very beginning of a long context can be overshadowed by the immediate tool outputs. If the agent gets deep into a debugging loop \(e.g., fixing lint errors\), it might forget the original feature it was supposed to implement. By moving the dynamic task objective to the end of the prompt, or echoing it in the system message of the tool result, you leverage recency bias to keep the agent focused on the actual goal, preventing infinite loops of fixing minor issues.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:47:33.453791+00:00— report_created — created