GitHub Copilot Setup
Omnodex traces GitHub Copilot in the Copilot CLI and in the agent in VS Code. Both read the same hook files, so one install covers both. Requires omnodex 0.15.0 or later.
What gets installed
Section titled “What gets installed”omnodex install copilot writes Copilot hooks that record sessions, prompts and every tool call Copilot’s hooks see. There is no Omnodex plugin to download for Copilot: the CLI writes Copilot’s own configuration directly.
| Part | What it does | How to get it |
|---|---|---|
| Hooks | Record sessions, prompts, tool calls before and after they run, failed calls, subagents and permission requests. In guardrails mode they can stop a call or ask you first | omnodex install copilot |
| MCP proxy entry (optional) | Routes the MCP servers you choose through the Omnodex proxy, which records each call with its timing and response size | Add --mcp |
Install
Section titled “Install”-
Install Omnodex on the host where you run Copilot.
-
Set up Copilot:
Terminal window cd /path/to/your/projectomnodex install copilotThe command asks whether to record every project you open (recommended) or only this one. Omnodex writes a file of its own,
omnodex.json, and never edits your other hook files:Records Hooks are written to Every project ~/.copilot/hooks/omnodex.json(or$COPILOT_HOME/hooks/when you setCOPILOT_HOME)This project .github/hooks/omnodex.jsonin the projectWhen it finishes, the command offers to connect to the hosted dashboard. Press Ctrl+C to skip.
-
Verify:
Terminal window omnodex status -
Start a new Copilot session. Hooks load when a session starts. Run a command or two, then look for a new session file under
event-log/sessions/in your Omnodex home, or openomnodex dashboard.
Route MCP servers through the proxy
Section titled “Route MCP servers through the proxy”Copilot’s hooks already record MCP tool calls. The proxy adds measured timing, response size and parameter redaction for the servers you move into it.
omnodex mcp-proxy install # creates omnodex-proxy.json if it is missingomnodex install copilot --mcp--mcp adds an omnodex server to the Copilot CLI’s ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json) and keeps every other server in the file. Then move the servers you want recorded from that file into upstream_servers in omnodex-proxy.json; see MCP Proxy for Any Client. VS Code keeps its MCP servers in its own configuration, so add the proxy there by hand if you want it in VS Code too.
What gets traced
Section titled “What gets traced”| Event type | When it is written |
|---|---|
session.started | A Copilot session starts |
session.ended | The session ends, with whether it completed, failed or was interrupted |
prompt.submitted | You submit a prompt. Includes the full prompt text |
tool.invoked | Copilot is about to run a tool: shell commands, file reads and edits, MCP tools. Includes the tool name and parameters |
tool.completed | The tool call finishes, with success or error and how long it took |
file.read, file.written | Copilot reads or writes files with its file tools |
subagent.started, subagent.stopped | Copilot starts or finishes a subagent |
permission.requested | Copilot asks you to allow a tool call (Copilot CLI only) |
Events carry interceptor: "copilot-hook" and platform: "copilot". Tool output is measured, not stored. See Event Schema for the fields.
Guardrails
Section titled “Guardrails”In guardrails mode, Omnodex answers each tool call before it runs:
- Stop: Copilot refuses the call, and the agent sees Omnodex’s reason.
- Hold for confirmation: Omnodex answers with Copilot’s
askdecision, so Copilot asks you before the call runs.
Nothing changes in Copilot’s hooks when you switch modes: Copilot always waits on them. Copilot refuses a call when its hook crashes or exits with an error, so Omnodex’s hook always answers, and when something goes wrong inside Omnodex the answer is “no decision” and the call goes through your own permission settings as usual.
Limits
Section titled “Limits”- No call id. Copilot gives its hooks no id that ties a finished call to the one that started it. Omnodex pairs them by session, tool and input, oldest first, so two identical calls running at once can swap durations.
- The cloud agent is not seen. The Copilot cloud agent runs on GitHub’s machines, where Omnodex is not installed.
- VS Code hooks are a Preview feature in VS Code. Behavior there can change with VS Code releases.
- No model name. Copilot’s hooks do not say which model a session used.
- Hooks in
.claude/settings.jsonrun in Copilot too. Copilot also reads a project’s Claude Code settings. When Omnodex records Copilot directly, the Claude Code hooks step aside for Copilot runs, so a call is recorded once and labeled Copilot. Withoutomnodex install copilot, Copilot runs in a project that has Claude Code hooks are recorded as Claude Code.
Uninstall
Section titled “Uninstall”| To remove | Run |
|---|---|
| Omnodex from this project (or leave it out, when recording every project) | omnodex uninstall copilot |
| Every-project recording | omnodex uninstall copilot --everywhere |
| The MCP proxy entry | omnodex uninstall copilot --mcp (0.15.1 or later) |
Each command shows what it will change and asks first. Other hooks and MCP servers stay, and so does your event data. See Uninstalling.
Troubleshooting
Section titled “Troubleshooting”No events after installing:
- Start a new Copilot session. Sessions opened before the install do not load the hooks.
- Run
omnodex statusin the project to confirm the hooks are installed. - Check
launcher.login your Omnodex home.Could not locate copilot hook shimmeans the launcher could not find Omnodex: for a source install,omnodex-config.jsonis missing acopilotentry undershim_paths; for an npm install,omnodexis not on thePATHCopilot runs hooks with.
Every tool call is refused: a hook file names a launcher this machine does not have, usually a .github/hooks/omnodex.json committed from another machine. Run omnodex install copilot here, or remove the file. If the file is committed, remove it from git so it stops reaching other machines.
Next steps
Section titled “Next steps”- Shadow Mode and Guardrails - Stop or hold risky calls
- MCP Proxy for Any Client - How the proxy works
- Running Detection - Risk detection works the same across all agents