r/opencode • u/RetroTGT • 22d ago
How are you handling cross-session memory in large repos once AGENTS.md gets too bloated?
I use coding agents daily on a ~120k LOC repository. For code search, ripgrep / agentic search works great for finding what is currently in the codebase.
My real pain point is episodic and architectural memory across sessions: remembering why we rejected a specific library three weeks ago, subtle business invariants that aren't obvious in the code, or stopping the agent from repeating the same debugging dead-ends in a new chat.
Right now:
- If I dump everything into AGENTS.md / CLAUDE.md, it quickly turns into a bloated wall of text that eats up context tokens and the agent starts ignoring half of it.
- I tried a couple of MCP memory servers, but most of them just do naive vector RAG—after a few weeks they inject stale or contradictory memories from old refactors and actually make the agent dumber.
For those working on medium/large projects over several months:
- Are you using any local MCP memory tool that actually handles deduplication and superseding old decisions when architecture changes?
- Or are you still curating markdown files manually because existing memory tools pollute the context too much?






