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.mdfile — 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:
- ✓Automatically reads your entire git history before your first session
- ✓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 setupThe 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 now has 89 memory tools available — including smart_recall, causal_trace, and brain_predict.
Zero onboarding: your git history teaches the Brain
Before your first Copilot session after setup, cachly runs brain_from_git — it reads your entire git log and extracts lessons from every bug fix, revert, and architectural decision your team has ever made.
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
| Feature | cachly | copilot-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 setupAuto-detects VS Code, JetBrains, Cursor, Claude Code, Windsurf. Free tier, no credit card, German servers.
Get your free token →cachly is a persistent AI Brain for developers — memory shared across Claude Code, Cursor, GitHub Copilot & Windsurf simultaneously. Auto-detects every editor. Bootstraps from your git history. 89 MCP tools. Free tier, EU servers, no credit card.
Your AI is forgetting everything right now.
Every session starts blank. Every bug re-discovered. Every deploy procedure re-explained. cachly fixes that in 30 seconds — your AI remembers every lesson, every fix, every teammate's hard-won knowledge. Forever.