GitHub Copilot hook capture requires VS Code with agent hooks support (such as VS Code Insiders or the latest VS Code release with Copilot Chat agent mode) and Workspace Trust enabled for your repository.
Quick start
1
Install or update rclm
Install the latest
rclm package from PyPI:2
Run the hook installer
Run To install only for GitHub Copilot / VS Code:The installer writes hook definitions and registers the ReclaimLLM MCP server automatically:
rclm-hooks-install to register hooks and MCP across all supported providers (including GitHub Copilot):3
Verify in VS Code
Open VS Code in your workspace, open Copilot Chat, and run an agent prompt (e.g.
@workspace or agent mode). When the session completes, ReclaimLLM finalizes the session record and uploads it to your dashboard.Hook configuration & scopes
ReclaimLLM supports both global (user-wide) and workspace-local configuration:Global installation
By default, hooks are placed in~/.copilot/hooks/rclm.json. Any VS Code window with Workspace Trust enabled will execute the hook commands across all projects.
Workspace-local installation
When using--local, ReclaimLLM writes the hook definitions to .github/hooks/rclm.json and the MCP server configuration to .vscode/mcp.json. This keeps hooks scoped strictly to the current repository and allows committing the hook configuration to source control for team consistency.
Supported lifecycle events
Therclm-copilot-hooks binary hooks into the VS Code agent lifecycle:
Model Context Protocol (MCP) integration
When you runrclm-hooks-install, MCP server registration is enabled by default. This exposes ReclaimLLM’s memory tools directly to GitHub Copilot:
search_sessions: Semantic and keyword search across past agent sessions.search_by_filename: Find prior sessions that modified a specific file.summarize_session: Generate a compact context summary of a past task.get_session: Retrieve session details and dashboard links.file_brief: Get a quick history of recent edits to a file.handoff: Create a continuation package for long sessions.
MCP configuration structure
For global installations, ReclaimLLM updates~/.copilot/mcp-config.json:
.vscode/mcp.json:
--no-with-mcp:
Historical session sync
If you previously used GitHub Copilot CLI or had existing agent session state, backfill your previous sessions into ReclaimLLM usingrclm-sync:
~/.copilot/session-state/**/events.jsonl, parses conversation turns, tool calls, and model metadata, and uploads them to your ReclaimLLM account.
Uninstalling hooks
To remove ReclaimLLM hooks from GitHub Copilot without affecting other tools:Verification & troubleshooting
Workspace Trust requirement
Workspace Trust requirement
VS Code restricts agent hooks and MCP servers to trusted workspaces for security. If hooks are not triggering:
- Check the bottom status bar or run Workspaces: Manage Workspace Trust from the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P). - Ensure the current folder is marked as Trusted.
Inspect the Copilot Chat Hooks output channel
Inspect the Copilot Chat Hooks output channel
VS Code logs all hook invocations to an internal output channel:
- Open the Output panel in VS Code (
Cmd+Shift+U/Ctrl+Shift+U). - In the dropdown selector on the right, select GitHub Copilot Chat Hooks.
- You will see logs of
SessionStart,UserPromptSubmit, and tool hook invocations as Copilot runs.
Verify hook registration in VS Code
Verify hook registration in VS Code
Open the Command Palette (or type
Cmd+Shift+P / Ctrl+Shift+P) and run:/hooks directly in Copilot Chat. Ensure the ReclaimLLM hook file (~/.copilot/hooks/rclm.json or .github/hooks/rclm.json) is listed and active.Check local session spool
Check local session spool
Before upload, completed sessions are spooled locally. You can inspect spooled records with:If files appear here after closing a session, hooks are capturing successfully.
Reload VS Code after MCP installation
Reload VS Code after MCP installation
If Copilot does not recognize ReclaimLLM MCP tools immediately after running the installer, reload the VS Code window:
- Open the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P). - Run Developer: Reload Window.