Why it matters: AI assistants build an invisible working model of your codebase during a session, and that model goes stale exactly like a cache, except it never signals when it is wrong.
The Details:
- Ghost refactors: when you rename a function or split a module mid-session, the assistant's internal model often keeps both versions alive. Later it suggests code that calls the old name with full confidence, and the import even looks plausible until it hits real files and fails.
- Drifted configuration: mention a database version or feature flag early in a conversation, then switch branches where neither applies anymore. The assistant keeps generating code against the world it was told about at the start, because nothing in the conversation marks the moment the ground shifted underneath it.
- Green tests as a trap: generated tests often pass against the assistant's belief about the code's behavior rather than its actual behavior. A passing suite built on an unverified assumption doesn't flag a problem. It tells you to stop looking, which is worse than a failing test would have been.
- Fossilized context files: architecture notes and handoff docs written on Tuesday carry false authority by Friday if the underlying module changed on Wednesday. Assistants tend to defer to a committed file over what they can see in the live code, so stale documentation can actively override correct behavior instead of merely sitting unused.
Bottom Line: Treat every context file and in-session assumption as a cache entry with an expiration date, and prune or re-verify it before trusting the next suggestion.