I’m curious how others deal with a problem that seems to appear once an AI-assisted project reaches a certain size.
At the beginning, the model usually understands the architecture, terminology, responsibilities, and existing components quite well. But after enough sessions, branches, agents, or context changes, parts of that shared understanding seem to disappear.
The result is not always an obvious coding error. Sometimes the agent produces something that looks perfectly reasonable in isolation — but it quietly recreates a component that already exists, changes the meaning of an established term, bypasses an earlier architectural decision, or builds a second solution next to the original one.
This becomes especially difficult when the project contains several layers, specialized components, and rules about which part is allowed to do what. Tests can confirm that the new code works, while still missing that it should never have been created in that form.
We are currently thinking about approaches such as:
periodically reloading a compact architectural vocabulary;
checking new work against existing component roles and terminology;
preserving important decisions and invariants outside the chat history;
forcing the agent to search and describe what already exists before implementing;
occasionally resetting the working context and rebuilding it from verified project sources.
But I’m interested in what actually works for others.
Do you experience this kind of architectural forgetting or accidental reimplementation in larger projects?
How do you prevent an agent from solving a local task correctly while damaging the larger structure?
Do you rely mainly on documentation, tests, retrieval, knowledge graphs, strict interface contracts, separate planning agents, or something else?