One-way bridge: GitHub Copilot CLI reads Claude Code's auto-memory as single-source-of-truth. Race-safe by design — Claude writes, Copilot reads, and a scratch file captures Copilot's learnings for human promotion.
Claude Code has a frontmatter-indexed auto-memory tree under ~/.claude/projects/<enc-home>/memory/. It's human-curated, synced across nodes (memory-share), and the most durable context a multi-agent setup can reference.
GitHub Copilot CLI (GA Feb 2026) supports three things that make bridging cheap:
$HOME/.copilot/copilot-instructions.md— auto-loaded every session.hooks.sessionStartin$HOME/.copilot/config.json— can injectadditionalContextat session open.- Per-repo
AGENTS.mdand model-specificCLAUDE.mdat repo root — Copilot already reads these natively.
Point Copilot at Claude's memory with an instructions file + SessionStart hook and you get one context across both agents without copying, syncing, or duplicating schema.
- One-writer rule. Claude owns
memory/. Copilot reads only. Avoids the race two agents writing a shared store would create. Copilot's own learnings land in$HOME/.copilot/bridge-scratch.md, and the human promotes them into Claude memory when they're worth it. - Instructions file + hook, not MCP. An MCP memory server (mem0, OpenMemory, SuperMemory) would give Copilot a symmetric write path and add a background process. That path breaks the one-writer rule and duplicates Claude's schema. Skipped deliberately.
- Coexist with Copilot's native Agentic Memory. Public preview since Jan 2026. Repo-scoped, 28-day expiry, auto-captured with citations. Orthogonal — it handles per-repo transient; Claude memory handles user-scoped durable. Leave it on.
- Hook is read-only. Worst case: script fails, no injection, session still works because
copilot-instructions.mdtells the agent to Read the files itself.
copilot-bridge/
├── README.md # this file
├── TEMPLATE-copilot-instructions.md # user-level instructions, fill in the blanks
├── hooks/
│ └── inject-memory.sh # SessionStart hook, emits CLAUDE.md + MEMORY.md as additionalContext
├── config.json.patch.md # how to register the hook
├── verify.sh # probe that confirms bridge is live
├── NOTES.md # measurements, options weighed, caveats
└── examples/
└── evnchn-bridge.md # a working instantiation (scrubbed)
- Copy
TEMPLATE-copilot-instructions.mdto$HOME/.copilot/copilot-instructions.md. Fill in the User baseline block. The memory-path lines are already correct for macOS — Linux nodes need one path rewrite (-Users-evnchn→-home-evnchn). - Copy
hooks/inject-memory.shto$HOME/.copilot/hooks/andchmod +x. Edit themem_dirline if your home-encoded path differs. - Register the hook in
$HOME/.copilot/config.jsonusing the patch inconfig.json.patch.md.
Run ./verify.sh to confirm the bridge loads from any cwd.
Baseline probe: "what is my dashboard URL", fresh session each time.
| Instructions file only | + SessionStart hook | |
|---|---|---|
| Latency | 38 s | 7 s |
| Input tokens | 75.9 k | 19.1 k |
| Read calls | 5 | 0 |
Hook pre-loads the CLAUDE.md + MEMORY.md index (~18 KB). Topical questions still drive Copilot to Read specific memory files per the instructions-file protocol.
Private staging. Working end-to-end on MacBook Air M4 with gpt-5.2-codex. Awaiting Evan review before any public graduation or docs polish.
memory-share— syncs Claude memory across homelab nodes. This repo extends reach from Claude-only to Claude + Copilot.claude-code-stop-gate,claude-code-time-awareness— the hook pattern this repo mirrors.