GitHub Copilot CLI Provider
Monitor and analyze your GitHub Copilot CLI sessions with GuideMode.
What is GitHub Copilot CLI?
Section titled “What is GitHub Copilot CLI?”GitHub Copilot CLI is GitHub’s coding agent for the terminal. It reads and edits files, runs commands, and can hand work to subagents, using whichever model your Copilot plan offers: GPT, Claude, Gemini or GitHub’s own.
Requirements
Section titled “Requirements”Install GitHub Copilot CLI
Section titled “Install GitHub Copilot CLI”npm install -g @github/copilotcopilotSign in when Copilot asks you to. GuideMode needs nothing from your Copilot account; it only reads the transcripts Copilot writes on your machine.
Setting up capture
Section titled “Setting up capture”Install the GuideMode CLI and run setup:
npm install -g guidemodeguidemode setupSetup detects Copilot CLI when copilot is on your PATH, and installs everything it needs
alongside any other agents it finds (Claude Code, Codex).
What setup installs
Section titled “What setup installs”| Location | |
|---|---|
| Hooks (user) | ~/.copilot/hooks/guidemode.json |
Hooks (--project) |
.github/hooks/guidemode.json in the current repository |
| Skill | ~/.copilot/skills/guidemode |
The hooks file belongs to GuideMode alone. Setup writes it and guidemode uninstall deletes
it; your own hook files in the same directory are never read or changed.
The hooks run guidemode session-start when a session starts, and guidemode sync after each
tool call, at the end of each turn, before a compaction and at the end of the session. Every
hook has both a bash and a powershell command, so the same file works on macOS, Linux and
Windows. If a hook fails or times out, Copilot carries on regardless.
If you set COPILOT_HOME, everything this page places under ~/.copilot lives under that
directory instead.
Control which repositories sync with guidemode enable / guidemode disable, or set a
deny-by-default policy at setup. See Controlling what syncs.
File Locations
Section titled “File Locations”Copilot writes one append-only event log per session:
macOS & Linux
Section titled “macOS & Linux”~/.copilot/├── hooks/│ └── guidemode.json└── session-state/ └── <session-id>/ └── events.jsonlWindows
Section titled “Windows”%USERPROFILE%\.copilot\└── ... (same structure)Each sync reads events.jsonl, converts it to GuideMode’s canonical format (the same one
Claude Code and Codex sessions use), redacts it locally and uploads only what is new since the
last sync.
What Gets Captured
Section titled “What Gets Captured”- Prompts: what you typed. Copilot’s own system prompt and the reminders it injects into your messages are left out.
- Responses: the assistant’s text, and its reasoning where Copilot records it in the clear
- Tool calls and results: under Copilot’s own names (
view,rg,glob,edit,create,apply_patch,bash,taskand the rest), with their output and whether they failed - Subagents: work delegated through the
tasktool is shown inline as a sidechain, under the parent session rather than as a session of its own - Compactions: when Copilot compacts its context
- Context: working directory, git branch, model and Copilot version
Metrics
Section titled “Metrics”Copilot sessions get the same metrics as every other provider. Tools are classified by what
they do rather than what they are called, so view and rg count as reads, edit, create
and apply_patch as writes, and bash as running something: read-before-write, verification
and the read/write ratio all work as they do for Claude Code.
Things to know
Section titled “Things to know”Token usage arrives when the session ends
Section titled “Token usage arrives when the session ends”Copilot records token usage once, when a session shuts down, as a total per model. So:
- a session that is still running shows no tokens or cost until you exit Copilot;
- tokens are attributed to each model correctly, including the models your subagents used, but not to individual turns;
- context-window utilisation is not reported for Copilot sessions, because Copilot never states how full the window was at any moment.
Resuming a session with copilot --resume is handled: each shutdown contributes only what was
spent since the previous one, so a resumed session is not counted twice.
Cost is API-equivalent, not your bill
Section titled “Cost is API-equivalent, not your bill”Copilot bills in premium requests, not tokens. The cost GuideMode shows is the list price of the tokens consumed, from the same price table as every other provider, so sessions can be compared across tools. A model with no public per-token price, such as one of GitHub’s own, is shown as unpriced rather than as free.
Reasoning is mostly encrypted
Section titled “Reasoning is mostly encrypted”Copilot stores most model reasoning in encrypted form. GuideMode shows the reasoning summaries Copilot writes in the clear and skips the rest.
Limitations
Section titled “Limitations”- Copilot coding agent is not supported. The cloud agent that works on GitHub issues runs in GitHub’s sandbox, not on your machine, so there is no local transcript to capture.
- Copilot in VS Code and other editors is not captured. Only the
copilotterminal agent is.
