Skip to content

Quickstart for GitHub Copilot Users ​

If you have a GitHub Copilot subscription (Individual, Business, or Enterprise), Kompile connects natively to Copilot (github-copilot, https://api.individual.githubcopilot.com or your GitHub Enterprise proxy endpoint) via GitHub's OAuth device flow. Because Copilot exposes multiple model families under one subscription (OpenAI GPT/Codex, Anthropic Claude, Google Gemini, xAI Grok), Kompile handles wire-protocol routing automatically — Messages for claude-*, Responses for gpt-5*/grok-*, and Chat Completions where appropriate.

You don't need to remember flags or long model IDs. Run the interactive wizard once to sign in via GitHub's device flow, pick from the live models enabled on your Copilot plan, and save your defaults — after that, just run kompile chat:

bash
cd /path/to/your/repo
kompile chat             # Launches SetupWizard on first run (or `kompile chat --setup` anytime)

In SetupWizard, pick Standard Chat → GitHub Copilot, follow the device-code prompt (or run bare kompile auth login / /auth inside chat), select your model, and save your project or global defaults.


1. Authenticate (OAuth device flow only) ​

GitHub Copilot in Kompile is OAuth-only (supportsApiKey() == false — there is no static API-key login).

Run bare kompile auth login (or /auth inside chat) and select GitHub Copilot, or use direct CLI commands for Enterprise hosts and multiple named accounts:

bash
# Standard github.com device-code login
kompile auth login github-copilot

# GitHub Enterprise host
kompile auth login github-copilot --enterprise-domain github.mycompany.com

# Optional: store a second named account (e.g. work vs personal)
kompile auth login github-copilot --name work --no-switch
kompile auth list github-copilot

Follow the printed verification URL and enter the one-time user code. Kompile exchanges the GitHub token for a Copilot session token automatically (and also recognizes COPILOT_GITHUB_TOKEN when present).


2. Start chatting ​

Once saved via kompile chat --setup, run kompile chat. Direct CLI commands for scripts or one-off overrides:

bash
cd /path/to/your/repo

# Interactive setup wizard — fetches live models enabled for your Copilot plan
kompile chat --setup

# Direct CLI overrides
kompile chat --provider github-copilot --model gpt-5.6-sol --effort medium

# Pin a named work credential to this session only
kompile chat --provider github-copilot --model gpt-5.6-sol \
  --credential work --auth-scope session

Switch models at any time with /model — Kompile queries your Copilot /models catalog live and caches the last-known-good list in ~/.kompile/cache/model-catalogs.json.

Headless / CI one-shot turns ​

bash
kompile chat --provider github-copilot --model gpt-5.6-sol \
  --prompt "Audit the API handlers for missing auth checks" \
  --output-format stream-json

3. How resolve_model works with GitHub Copilot ​

Before launching a subagent (task, multi_task, or quorum_task), Kompile agents call resolve_model — a read-only discovery tool that never runs a model turn, never triggers a login, and never silently switches accounts:

  1. resolve_model action=providers: Lists every registered provider (github-copilot, openai, anthropic, gemini, openrouter, etc.) with its active transport and login state.
  2. resolve_model action=families: Shows how ModelRouting maps model prefixes (claude-*, gpt-*, o1-*/o3-*/o4-*, gemini-*, grok-*, deepseek-*, qwen*, llama-*) to their first-party owner and secondary hosts.
  3. resolve_model action=models provider=github-copilot [query=<substring>]: Queries Copilot's live catalog, automatically omits any model banned by /subagent-config, and returns ready-to-copy taskArguments (provider, model).

How your vendor of choice is resolved at dispatch ​

ModelRouting follows a strict 6-step precedence when a delegation specifies a model without an explicit provider:

  1. Keep your configured vendor if it hosts the family: Because github-copilot is a registered host for claude-*, gpt-*, o1-*/o3-*/o4-*, gemini-*, and grok-*, staying on provider=github-copilot keeps all of those families on your Copilot subscription automatically.
  2. First-party owner: If your active provider does not host the requested family, Kompile routes to the family's first-party owner (e.g., anthropic or openai) if configured.
  3. Single configured host: Otherwise, if exactly one configured provider hosts the family, Kompile selects it.
  4. Never guess: If multiple non-owner hosts (e.g., both github-copilot and openrouter) could serve the family and neither is active, Kompile fails fast with AmbiguousModelRouteException and asks for an explicit provider=github-copilot.

WARNING

Never make top-tier models like Opus or Fable (or Astra / Neon) a subagent unless you are sure of the cost. On GitHub Copilot, top-tier frontier models carry steep premium-request multipliers, and a parallel multi_task or quorum_task fan-out multiplies every request across every worker.

RoleRecommended ModelWhy
Main agent (lead)gpt-5.6-sol (or claude-sonnet-*)Strong architecture, synthesis, and planning at predictable multiplier cost
Default subagent workersgpt-5.6-luna (or Haiku / Flash)Fast, economical execution for exploration, test runs, diffs, and parallel edits
Banned from subagents*opus*, *fable*, *astra*, *neon*Prevents accidental premium-request burn during autonomous fan-out

Apply these guardrails once ​

Subagents never silently borrow the parent chat's Kompile-managed credential — you must name the credential in /subagent-config route (from kompile auth list github-copilot) or pass credential=<name> at dispatch:

text
/subagent-config ban *opus*
/subagent-config ban *fable*
/subagent-config ban *astra*
/subagent-config ban *neon*
/subagent-config route github-copilot/gpt-5.6-luna credential=default
/subagent-config per-session 4
/subagent-config budget 400000
/subagent-config preload-tools read,grep,glob,edit,write,bash

Everything is saved to ~/.kompile/config/subagent-config.json (credential names only — never secrets). Once banned, resolve_model action=models provider=github-copilot omits those models entirely and SubagentAdmission refuses any dispatch that asks for them.


Resuming & importing sessions onto GitHub Copilot ​

GitHub Copilot runs through Kompile Standard Chat, so every session is stored in ~/.kompile/conversations/ and can be resumed directly — or you can import an existing Claude Code, Codex, Antigravity, OpenCode, or Cursor session and continue it on your Copilot subscription:

bash
# Resume your own Kompile sessions
kompile chat --continue                                # Resume last session in this project
kompile chat --resume <id> --provider github-copilot --model gpt-5.6-sol
kompile resume                                         # Interactive multi-tab session browser
kompile resume-all                                     # Restore all recently active terminal windows

# Import from an external CLI/IDE and continue on GitHub Copilot
kompile session import-all
kompile chat --resume <imported-id> --provider github-copilot --model claude-sonnet-4.5

CrossAgentResumeCompactor automatically sizes imported transcripts to your target Copilot model's context window. See Import & Resume for all 11 adapters and batch recovery options.

Common gotchas ​

  • Quota visibility in /usage: Copilot's inference session token does not expose account billing usage via API. Check https://github.com/settings/copilot for remaining premium-request quotas, while using Kompile's /cost and kompile usage cost for local token and tool-call tracking.
  • Enterprise vs individual endpoints: If your organization runs GitHub Enterprise, always pass --enterprise-domain during kompile auth login github-copilot so token exchange resolves the right proxy-ep host.

Next steps ​

Released under the Apache-2.0 License.