feature
Oct 8, 2026Capture GitHub Copilot agent sessions in VS Code and query past session history via MCP using native agent hooks.
RCLM now captures GitHub Copilot agent sessions directly in Visual Studio Code using the native VS Code Agent Hooks specification, while automatically configuring the ReclaimLLM Model Context Protocol (MCP) server for session search and recall.
When running Copilot Chat in Agent mode, RCLM records complete sessions—including conversation turns, tool executions, generated file diffs, and token metrics—and uploads them to your ReclaimLLM dashboard. At the same time, the local MCP integration lets Copilot query past sessions and pull historical context into current conversations without leaving VS Code.
Visual Studio Code provides an agent hooks mechanism that executes local command binaries in response to agent lifecycle events. RCLM hooks into this system via a dedicated handler (rclm-copilot-hooks) that receives event payloads on standard input and exits cleanly without interrupting editor workflows.
You can install Copilot hooks alongside all supported clients or target Copilot specifically:
# Install across all supported clients (now includes Copilot by default)
rclm-hooks-install
# Or install for GitHub Copilot in VS Code only
rclm-hooks-install --copilot
# (alias: rclm-hooks-install --vscode)
The installer configures both lifecycle capture and MCP memory tools in one pass:
Lifecycle Hook Configuration: Registers commands for the complete agent lifecycle:
SessionStart: Initializes local tracking, records the workspace root and model, and prepares context policies.UserPromptSubmit: Captures prompt inputs from the developer.PreToolUse: Intercepts tool calls before execution to enforce local data loss prevention (such as secret redaction in sensitive files) and output compression.PostToolUse: Captures tool outputs, file changes, and token counts.Stop: Assembles the normalized session record and uploads it to ReclaimLLM.SubagentStart / SubagentStop and PreCompact: Records subagent delegations and context window compaction checkpoints.Automated MCP Server Setup: Configures rclm-mcp so Copilot Chat can call ReclaimLLM tools (search_sessions, get_session, summarize_session, file_brief, and handoff) directly.
By default, RCLM installs hooks globally in your home directory:
~/.copilot/hooks/rclm.json~/.copilot/mcp-config.jsonIf you prefer to restrict capture or check hook configuration into a repository, use --local:
cd /path/to/project
rclm-hooks-install --local --copilot
This writes hook definitions to .github/hooks/rclm.json and MCP server settings to .vscode/mcp.json. Any team member with Workspace Trust enabled will share the same hook and tool setup.
If you previously used GitHub Copilot CLI or have existing session logs, rclm-sync backfills your historical sessions:
rclm-sync --copilot
The sync parser reads historical event logs from ~/.copilot/session-state/, extracts message turns and tool executions, and uploads them to your dashboard without duplicating already captured sessions.
Before this release, recording GitHub Copilot interactions required routing traffic through an external HTTP proxy. While proxy capture records raw completions, it misses critical agent-level semantics: internal tool calls, subagent spawns, file diffs, and working directory context.
Building a dedicated VS Code extension was considered, but extensions add background overhead, require Marketplace distribution, and duplicate functionality that VS Code already provides through native hooks.
By building on VS Code's native agent hooks, RCLM achieves:
0. A capture issue will never disrupt your coding session.We are watching how the VS Code agent hooks specification evolves across new VS Code releases. If you run into unexpected payload shapes, missing tool invocations, or edge cases with multi-root workspaces, please open an issue or reach out through the dashboard.