I tried 4 approaches to AI agent memory. Here's what actually worked. Six months ago I started building a governance SaaS product with Claude Code as my primary dev partner. The codebase grew. The context problem grew faster. I tried four approaches to keeping the agent oriented across sessions. Three of them failed in predictable ways. Here's what I learned from each. Approach 1: Long CLAUDE.md The obvious starting point. One file, everything in it — project description, architectural decisions, tech stack, naming conventions, open questions, constraints, active tasks. What happened: It worked for the first two months. Then the file hit ~600 lines and started failing silently. The agent would read it, acknowledge constraints, then propose something that violated a constraint buried in paragraph 14. It wasn't hallucinating — it was attending correctly to the first ~300 tokens and poorly to the rest. The failure mode: Flat context doesn't scale. The most relevant information competes with everything else.…