cachly← All posts
Tutorial · May 13, 2026

How to Give GitHub Copilot Persistent Memory

GitHub Copilot is a great coding assistant — until you close VS Code. Then it forgets your architecture, your conventions, your recent bug fixes. Every new session starts from zero. Here's how to fix that permanently in 30 seconds.

The problem: Copilot has no memory

Every time you open a new Copilot Chat session, you start from scratch. No memory of:

  • ✗The architectural decisions you made last week
  • ✗The bug you spent 3 hours fixing — and what caused it
  • ✗Your team's coding conventions and preferred libraries
  • ✗The deploy procedure that always trips people up
  • ✗What your colleague discovered about that third-party API

The standard workaround is a .github/copilot-instructions.md file — a static Markdown document you maintain by hand. It helps, but it doesn't scale: it goes stale, it doesn't learn from your git history, and it's the same for everyone on the team regardless of what they're working on.

The solution: MCP + cachly

GitHub Copilot supports the Model Context Protocol (MCP) — an open standard for connecting AI assistants to external tools and data sources. cachly's MCP server gives Copilot a persistent brain that:

  • ✓Reads your last 100 commits during setup and turns them into lessons
  • ✓Learns from every commit via a post-commit git hook
  • ✓Surfaces relevant context at the start of every conversation
  • ✓Shares knowledge across your whole team in real time
  • ✓Works in VS Code, JetBrains, and anywhere Copilot runs

Setup: 30 seconds, one command

Run this once. cachly detects Copilot (and any other AI editors you have installed) and writes all config files automatically:

npx @cachly-dev/mcp-server@latest autopilot

The wizard signs you in with one browser click, then writes the correct .vscode/mcp.json config for Copilot:

// .vscode/mcp.json (auto-written by cachly setup)
{
  "servers": {
    "cachly": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cachly-dev/mcp-server@latest"],
      "env": {
        "CACHLY_JWT": "your-token-here"
      }
    }
  }
}

That's it. Restart VS Code and Copilot can now use cachly's tools — including smart_recall, causal_trace, and brain_predict.

Zero onboarding: your git history teaches the Brain

During setup, cachly runs brain_from_git — it reads your last 100 commits and extracts lessons from the bug fixes, reverts, and architectural decisions in them.

What brain_from_git extracts from your git history
✓ Fix: auth JWT validation — always check expiry before signature
✓ Revert: removed Redis pub/sub — race condition under load
✓ Decision: switched from REST to tRPC for type safety across monorepo
✓ Warning: Stripe webhook order is not guaranteed — always idempotent

Copilot arrives at your first session already knowing years of institutional knowledge — without you writing a single line of documentation.

What it looks like in practice

Open Copilot Chat. At the start of your session, smart_recall fires automatically and Copilot opens with a briefing:

// Copilot Chat — session start
> Good morning. Here's what I remember:
>
> Last session: Working on the payments refactor.
> Open: 3 TODOs in stripe-webhook.ts
> Team learned yesterday: Always set idempotency keys
>   for Stripe charges — see commit a3f91c2
>
> brain_predict: Moderate risk for today's deploy.
> The k8s namespace config touched in PR #441
> matches a past race condition pattern (2024-08-12).
> Recommend review before deploying.

No prompt engineering. No manual context file. Copilot just knows.

One brain, shared across your whole team

With cachly's Team Brain, every developer on your team shares the same persistent memory. When Sarah fixes an auth bug at 3pm, Marcus's Copilot session at 4pm already knows about it — automatically, without anyone writing a Slack message or updating a wiki.

This works across editors too. If half your team uses Copilot and the other half uses Cursor or Claude Code — the same Brain, the same memory, for everyone.

cachly vs copilot-instructions.md

Featurecachlycopilot-instructions.md
Learns from git history automatically✅❌
Updates without manual editing✅❌
Per-session dynamic context✅❌
Team knowledge sharing✅❌
Failure prediction (brain_predict)✅❌
Root-cause analysis (causal_trace)✅❌
Cross-language search✅❌
Works with Cursor, Claude Code too✅❌
Free tier✅✅
No setup required❌✅

copilot-instructions.md is a good starting point. cachly is what you graduate to when your team grows and manual maintenance becomes a burden.

Give Copilot memory in 30 seconds

npx @cachly-dev/mcp-server@latest autopilot

Auto-detects VS Code, JetBrains, Cursor, Claude Code, Windsurf. Free tier, no credit card, German servers.

cachly.dev

For solo developers, teams and whole companies

Explain it once. Every AI knows it.

cachly keeps what you explain to your AI in every session. Claude Code, Cursor, Copilot and Windsurf read your rules, decisions and solved bugs: for you alone, for your whole team and for every team in your company. Servers in Germany, with SSO and a DPA for companies.

Servers in the EU · one command, restart your editor, done · 1 project free

Four ways to install

Claude Code
/plugin marketplace add cachly-dev/cachly-mcp
/plugin install cachly-brain@cachly

Then turn on auto-update once: /plugin → Marketplaces → cachly → Enable auto-update

Any MCP editor
npx @cachly-dev/mcp-server@latest autopilot