Demystifying VS Code Copilot's Memory: A Guide for Engineering Intelligence Tools

Navigating the cutting edge of AI-powered development tools can sometimes feel like exploring uncharted territory. A recent GitHub Community discussion highlighted a common point of confusion for developers leveraging VS Code Copilot: where exactly do those "memory files" go?

User yosun initiated the discussion, puzzled by a Copilot agent's claim to have created a memory file named fal-realtime-notes.md during a debugging session. Despite diligent searching, the file was nowhere to be found, leading to the question: did Copilot hallucinate, or are these memory files stored in an unexpected location?

A developer searching for hidden Copilot memory files within a VS Code editor interface.
A developer searching for hidden Copilot memory files within a VS Code editor interface.

Unpacking Copilot's Memory Management

The answer, provided by kabir2004, sheds light on how VS Code Copilot handles its internal "memory." These aren't standard files you'd find in your project directory or file explorer. Instead, they are managed locally by VS Code's built-in memory tool, which is currently in preview.

This distinction is crucial for understanding how these advanced engineering intelligence tools operate. They integrate deeply into the IDE environment, creating a seamless experience that often abstracts away the underlying file system.

How to Locate Copilot Memory Files

To access these elusive memory files, you need to use the VS Code Command Palette. This is the primary interface for interacting with many of Copilot's agent features:

Ctrl+Shift+P / Cmd+Shift+P (Open Command Palette)
Type: Chat: Show Memory Files

Executing this command will present a list of all memory files, categorized across three distinct scopes:

  • User memory: This memory persists across all your workspaces and conversations. It's a global store, with the first 200 lines automatically loaded each session, acting as a persistent knowledge base for your AI assistant.
  • Repository memory: Scoped to your current workspace, this memory persists across different conversations within that specific project. It's ideal for context that is relevant to a particular codebase.
  • Session memory: This is the most transient scope. Memory files stored here are tied to the current conversation and are automatically cleared once that chat session ends. This is often the culprit when "lost" notes are reported.

Why Your Memory File Might Be Missing

In yosun's case, the fal-realtime-notes.md file likely disappeared because it was created as session memory. Once the debugging chat session concluded, the memory was wiped. Another possibility, especially given that the memory tool is still in preview, is that the agent's tool call to create the file silently failed. It's a reminder that even sophisticated software development performance metrics can be impacted by underlying tool reliability.

You can verify if the memory tool is enabled in your VS Code settings:

github.copilot.chat.tools.memory.enabled

Best Practices for Persistent Notes

To prevent future loss of valuable insights and ensure your engineering intelligence tools work for you effectively, consider these strategies:

  • Request Repository Memory: Explicitly ask the Copilot agent to save important notes to repository memory. This ensures they persist across conversations within that workspace.
  • Create Actual Files: For critical information, bypass the memory tool altogether and instruct the agent to create a standard file directly within your project directory. This offers the most robust persistence.

Understanding these nuances of Copilot's memory management empowers developers to better leverage these powerful AI assistants. While the tool is still evolving, knowing how to find, use, and persist its memory can significantly enhance your productivity and debugging workflows.

For more detailed information, refer to the official VS Code documentation on Copilot agents and memory: https://code.visualstudio.com/docs/copilot/agents/memory

An illustration depicting the three distinct Copilot memory scopes: User, Repository, and Session memory, with icons representing their persistence.
An illustration depicting the three distinct Copilot memory scopes: User, Repository, and Session memory, with icons representing their persistence.

Track, Analyze and Optimize Your Software DeveEx!

Effortlessly implement gamification, pre-generated performance reviews and retrospective, work quality analytics, alerts on top of your code repository activity

 Install GitHub App to Start
devActivity Screenshot