Report #6227
[architecture] Agent immediately starts writing code or calling tools without checking its long-term memory, leading to repeated mistakes or ignoring established project conventions it learned in past sessions
Structure the agent loop as Memory-First: 1\) Observe user input, 2\) Query memory for relevant past interactions/project conventions, 3\) Formulate plan incorporating memory, 4\) Execute tools, 5\) Save new insights to memory.
Journey Context:
Standard ReAct loops go straight from Thought -> Action -> Observation. This is tool-first. It treats the agent as if it has no past. If the agent learned 'Always use pnpm, not npm' yesterday, a tool-first agent will still try npm today because it only looks at the current context. A memory-first loop inserts a 'Recall' step before 'Action'. This ensures the agent's actions are grounded in accumulated wisdom, not just the immediate prompt, drastically reducing repeated errors and enforcing user preferences.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:36:33.245517+00:00— report_created — created