VS Code AI Memory: Persistent Context Across Sessions with Continue and MCP
VS Code AI extensions like Continue.dev reset every session. Here's how to add persistent memory across sessions so your AI actually learns your codebase.
MemNexus Team
VS Code is still the editor most developers use every day. And in the last two years, the AI extension ecosystem around it has exploded — Continue.dev, GitHub Copilot, Cline, RooCode, and more. Each one brings a capable AI assistant directly into your editor.
None of them remember you tomorrow.
Every time you open a new chat, you start from zero. The coding conventions you explained last week. The architectural decision you made after an hour of discussion. The root cause of that subtle bug you finally traced down. Gone.
That's not a failure of the extensions. It's the underlying architecture of how LLMs work. But there's a practical fix.
What disappears at the end of every session
The reset hits hardest with knowledge that took real effort to establish:
- Project conventions. The patterns your codebase has settled on. Why you organize things the way you do. The rules that aren't in a linter because they require judgment.
- Architectural decisions. Not just what you chose, but why. The tradeoffs you considered. The alternatives you ruled out and the reasons you ruled them out.
- Debugging history. That three-hour investigation that pinpointed the source of an intermittent failure. Next time similar symptoms appear, you'll re-investigate from scratch.
- Your preferences. How you like error handling structured. The naming patterns that feel right for this domain. The code style that goes beyond what ESLint enforces.
After a few weeks on a project, you've built up a lot of this context in your head. Your AI assistant hasn't. Every session, you either re-explain or accept less useful output.
Why VS Code AI extensions can't fix this natively
Large language models are stateless. They process a context window and generate output — but they have no mechanism to write to persistent storage between sessions. When the conversation ends, so does everything the model learned during it.
Tool builders can work around the edges of this. But the core constraint is architectural.
What Continue.dev offers
Continue.dev is one of the most capable open-source AI coding assistants available for VS Code. It supports multiple models, has excellent codebase indexing, and — relevant here — has native MCP support.
For persistent preferences, Continue uses .continuerc.json and config.yaml for configuration. These are the right place for stable conventions: the models you use, system prompt templates, any project-wide instructions you want loaded consistently.
It works well. But it's static configuration, not memory. You maintain it by hand. It has no concept of what you worked on last Tuesday or what you've discovered since you wrote it.
What GitHub Copilot offers
GitHub Copilot loads workspace context from .github/copilot-instructions.md. It gives the model information about your project structure, conventions, and preferences — whatever you write there.
Again, useful. Again, static. The instruction file is a document you maintain, not a memory system that grows with your work.
What Cline and RooCode offer
Both use system prompts and prompt engineering to give the model project context. Both reset fully between sessions. There's no built-in mechanism to carry forward what the model learned in one conversation to the next.
The MCP approach: a persistent memory layer for any VS Code AI extension
Model Context Protocol is a standard for connecting AI tools to external capabilities. Continue.dev has native MCP support built in. GitHub Copilot in VS Code supports MCP through .vscode/mcp.json. Cline and other extensions that support MCP tools can use it too.
MemNexus implements an MCP server. When you connect it to your VS Code AI extension, the extension gains access to a set of memory tools: saving context, searching your memory store, and loading relevant history at the start of each session.
The memory lives in MemNexus, outside any single session. It spans conversations, days, and the lifetime of your project.
Setting up Continue.dev with MemNexus
Getting MemNexus connected to Continue.dev takes about two minutes.
First, install the MemNexus CLI and log in:
npm install -g @memnexus-ai/cli
mx auth login --api-key YOUR_API_KEY
mx setup
mx setup detects which agents are installed and walks you through configuration. It writes the MCP server entry to Continue.dev's config and adds steering rules that teach Continue how to use the memory tools effectively.
Restart Continue.dev, and the memory tools are available in agent mode. From here, context accumulates automatically.
What actually persists across your VS Code sessions
Once connected, here's what MemNexus stores and surfaces across sessions:
Coding style and preferences. Explain your error handling pattern once. MemNexus saves it. The next session, Continue already knows.
Project decisions with reasoning. Not just "we use Zod for validation" but "we chose Zod over Yup because the inference is more reliable with discriminated unions in this schema." The why persists alongside the what.
Debugging history. That investigation into why your WebSocket connections drop under load becomes a searchable memory. When similar symptoms appear, Continue can surface what you already know.
Tech stack context. The specific versions, the configuration quirks, the integration details that aren't in any README. The things that only exist because you figured them out.
What not to do. Approaches you tried that didn't work. Gotchas that burned you. The knowledge that saves future-you from repeating the same investigation.
The compound effect over weeks
The value of persistent memory isn't obvious after one session. It builds over time.
After a week, you've stopped re-explaining your naming conventions. After two weeks, Continue is helping you avoid patterns you've already ruled out. After a month, the memory store reflects the real trajectory of the project — the decisions made under pressure, the bugs traced to their source, the patterns that emerged from real use. Continue walks into each session carrying that history.
You stop re-explaining. You stop re-discovering. The things you've already figured out stay figured out.
Continue.dev is just the start
Any MCP-compatible VS Code extension can connect to MemNexus the same way. GitHub Copilot's MCP support means the same persistent memory layer works across whichever extension you're using on a given day. The memory is centralized. The tools are interchangeable.
This also means your memory isn't locked to any single AI tool. Switch between Continue and Copilot. Try a new extension. The context travels with you, not with the tool.
Using a different AI coding tool?
The same persistent memory approach works across the AI coding assistant ecosystem:
- How to Give Cursor Persistent Memory Across Sessions
- How to Give Windsurf Persistent Memory Across Sessions
- GitHub Copilot Memory: How to Make Copilot Remember Your Project
- How to Give Claude Code Persistent Memory
If you're using Cursor or Windsurf instead of VS Code, the same approach applies — see MemNexus vs Cursor for a direct comparison of how it works in that editor.
MemNexus is currently in invite-only preview. If you want your VS Code AI assistant to actually remember your work, request access at memnexus.ai/waitlist.
Get updates on AI memory and developer tools. No spam.
Related Posts
Cline AI Memory: Persistent Context Across Sessions in VS Code
Cline is one of the most powerful AI coding agents for VS Code, but it resets every session. Here's how to add persistent memory using MCP.
RooCode Memory: Persistent Context Across Sessions in VS Code
RooCode is a powerful autonomous coding agent for VS Code, but it resets every session. Here's how to add persistent memory using MCP.
JetBrains AI Assistant Memory: Persistent Context Across Sessions
JetBrains AI Assistant resets every session. Here's how to add persistent memory to IntelliJ, PyCharm, and WebStorm so your AI learns your project.