Why your AI assistant keeps suggesting you delete code that matters
You have seen it. The assistant reads a function, spots a line that looks redundant, and confidently proposes removing it. Except that line is a workaround for a race condition you fixed six months ago, after an incident. The AI does not know that, so it suggests undoing the fix.
This is not a model quality problem. A smarter model with the same missing information makes the same mistake. The problem is that the reason the code exists lives nowhere the AI can read it.
Where the “why” goes to die
Teams already try to keep this context somewhere:
- Comments rot. They drift from the code, and no one trusts them enough to act on them.
- ADRs get written once and never updated, disconnected from the lines they govern.
- Per-tool memory is trapped in one assistant and does not travel to the next.
- Vector databases retrieve fuzzy matches with no structure, and hallucinate confidently.
So the knowledge stays in one senior developer’s head. When that person is out, or the AI is driving, the context is simply gone.
Two costs, every single day
The missing “why” shows up as two recurring taxes:
- Dangerous suggestions. The AI removes intentional code, breaks a constraint it never saw, or reintroduces a bug the team already fixed.
- Re-explaining. You paste the same background into the chat again, burning tokens and minutes to re-teach what your team decided months ago.
Both compound as more of your work runs through AI.
What actually fixes it
The fix is not another place to write prose that will rot. It is to capture the decision as structured, human-approved context, version it in git next to the code, and serve it to any AI tool the moment it touches the relevant lines.
That is what SourceAnt does. The next time an assistant opens retry.ts, it already knows the retry cap is deliberate, why jittered backoff was rejected, and which decision it must not break. No re-explaining. No deleting the code that mattered.
Give your AI a memory it can trust
Self-host free, or start SourceAnt Cloud at $25 a month per team.