VS Code Copilot Setup
Clawkeeper integrates with GitHub Copilot's agent mode in VS Code through the experimental agent hook system. Shell commands, file reads, and file writes are sent to Clawkeeper before or after execution.
Copilot agent hooks are currently in Preview and require VS Code 1.92+ with GitHub Copilot Chat 1.230+.
What gets monitored
| Tool | Enforcement |
|---|---|
Shell commands (runTerminalCommand) | Block or warn before execution |
File reads (readFile) | Audit after execution |
File writes (writeFile, applyEdit) | Audit after execution (no pre-execution block) |
| Prompts | Not available — UserPromptSubmit not supported in Copilot |
| MCP tool calls | Not available — Copilot does not expose MCP hook events |
| Session check-in | Auto (registered on first event) |
Installation
Get your API key from Settings → API Keys in the dashboard, then run the installer:
bash install-hooks.sh --ide copilot --project /path/to/project
The installer writes .github/hooks/clawkeeper.json to the project root.
What gets generated
{
"version": 1,
"hooks": {
"pre-tool": {
"runTerminalCommand": {
"url": "https://clawkeeper.dev/api/v1/evaluate?tool=copilot",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
},
"post-tool": {
"readFile": {
"url": "https://clawkeeper.dev/api/v1/audit?tool=copilot",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
},
"writeFile": {
"url": "https://clawkeeper.dev/api/v1/audit?tool=copilot",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
},
"applyEdit": {
"url": "https://clawkeeper.dev/api/v1/audit?tool=copilot",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
}
Commit .github/hooks/clawkeeper.json to your repo. VS Code picks up the config automatically when the repo is opened.
Tool name mapping
Copilot uses different tool names from Claude Code and Cursor. Clawkeeper normalizes these on ingestion.
| Copilot tool name | Clawkeeper canonical name |
|---|---|
runTerminalCommand | Bash |
readFile | Read |
writeFile | Write |
applyEdit | Edit |
searchFiles | Glob |
searchCode | Grep |
Activity in the dashboard displays the canonical names regardless of which IDE generated the event.
Known limitations
Matchers are ignored. Copilot's hook system routes by tool name, not by matcher pattern. The matcher field used in Claude Code and Cursor settings has no effect — each tool must be listed individually.
No prompt hook. Copilot does not fire a pre-prompt hook. Prompt content is not captured or evaluated by Clawkeeper for Copilot sessions. Runtime Shield pattern detection runs only on tool call inputs.
No MCP hook events. GitHub Copilot does not expose hooks for MCP tool calls. MCP activity from Copilot is not visible in Clawkeeper.
Preview stability. The Copilot agent hook system is in Preview. Hook behavior, tool names, and config schema may change between VS Code releases. Check the GitHub Copilot changelog when upgrading VS Code.
Verifying coverage
- Open a repo with
.github/hooks/clawkeeper.jsoncommitted - Ask Copilot to run a terminal command (e.g.,
ls -la) - Check the Workstations page — the workstation should appear within a few seconds
- The shell command should be visible in the Activity tab
