Setting up MemPalace session hooks with GitHub Copilot CLI and VS Code #1419
mm6502
started this conversation in
Show and tell
Replies: 1 comment
|
+1 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
TL;DR
MemPalace hooks work with GitHub Copilot CLI and VS Code Copilot
using the same
claude-codeharness as Claude Code. No special config needed— just point to the right hooks directory.
The problem
After adding MemPalace to the MCP user profile for GitHub Copilot CLI / VS Code,
session memories weren't being saved automatically. There's no official guide for
this setup (related: #462).
Solution
1. Find your mempalace binary
2. Create the global hooks config
Global (all sessions):
~/.copilot/hooks/mempalace.jsonPer-project:
.github/hooks/mempalace.json{ "hooks": [ { "hooks": ["Stop"], "run": "mempalace hook run --hook stop --harness claude-code", "windows": "C:\\Users\\YOUR_USERNAME\\.local\\bin\\mempalace.exe hook run --hook stop --harness claude-code" }, { "hooks": ["PreCompact"], "run": "mempalace hook run --hook precompact --harness claude-code", "windows": "C:\\Users\\YOUR_USERNAME\\.local\\bin\\mempalace.exe hook run --hook precompact --harness claude-code" } ] }3. Smoke test
bash (macOS/Linux/WSL):
PowerShell (Windows):
4. Verify silent save is on (v3.3.0+)
Silent save is on by default since v3.3.0 — hooks write diary entries directly
without blocking the agent.
To verify, ask the AI agent to call the MemPalace MCP tool (type this in chat):
The response should show
silent_save: true. If it's false, enable it:Environment
runkey only)uv tool install mempalaceclaude-code(same for VS Code Copilot + Copilot CLI)~/.copilot/hooks/(global user profile)Related:
mempalace setup-hooksCLI to automate thisAll reactions