---
title: "Comment by Mateo Ruiz on \"AI Reads Your Codebase. Then It Forgets Everything.\" | Hashnode"
description: "The distinction between storing code context and storing the relationships behind that context is the interesting part here. An agent can retrieve the same file"
url: "https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6a9ffd870afc99876113b923"
---

[Discussion](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f)

Comment [AI Reads Your Codebase. Then It Forgets Everything.](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f)

[Mateo Ruiz](https://hashnode.com/@mateoruiz)

[Sep 8](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6a9ffd870afc99876113b923)

The distinction between storing code context and storing the relationships behind that context is the interesting part here. An agent can retrieve the same files in a new session, but that doesn't mean it has retained the reasoning needed to safely change them.

One practical extension I’d add is treating the semantic layer as a kind of architectural cache with explicit invalidation. If the code changes but the extracted relationships don't, the agent could be reasoning from a stale model without realizing it. Versioning those relationships against commits, tests, and design decisions could make the “persistent understanding” idea much more useful in real-world refactoring workflows.

That feels like an important bridge between semantic modeling and something engineers can actually trust in production.

[Hiroyuki Nakahata](https://hashnode.com/@iroha1203)

[Sep 8](https://hashnode.com/posts/ai-reads-your-codebase-then-it-forgets-everything/6a9ed058168eda7560b3648f/comment/6a9ffd870afc99876113b923#reply-6aa00060bd8e491067fe8866)

Thanks for the comment! That’s a really interesting point.

For a general semantic layer, I agree that you’d need some form of cache invalidation or versioning to make sure stale references don’t remain in use.

AAT is aiming to model the geometry of meaning in a codebase, so the idea is for ArchMap to be updated synchronously whenever the code changes. In other words, the operational assumption is that an AI agent should not end up reasoning from an outdated semantic model in the first place.
