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.
Fastest setup (interactive wizard — recommended)
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:
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:
# 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-copilotFollow 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:
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 sessionSwitch 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
kompile chat --provider github-copilot --model gpt-5.6-sol \
--prompt "Audit the API handlers for missing auth checks" \
--output-format stream-json3. 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:
resolve_model action=providers: Lists every registered provider (github-copilot,openai,anthropic,gemini,openrouter, etc.) with its active transport and login state.resolve_model action=families: Shows howModelRoutingmaps model prefixes (claude-*,gpt-*,o1-*/o3-*/o4-*,gemini-*,grok-*,deepseek-*,qwen*,llama-*) to their first-party owner and secondary hosts.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-copytaskArguments(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:
- Keep your configured vendor if it hosts the family: Because
github-copilotis a registered host forclaude-*,gpt-*,o1-*/o3-*/o4-*,gemini-*, andgrok-*, staying onprovider=github-copilotkeeps all of those families on your Copilot subscription automatically. - First-party owner: If your active provider does not host the requested family, Kompile routes to the family's first-party owner (e.g.,
anthropicoropenai) if configured. - Single configured host: Otherwise, if exactly one configured provider hosts the family, Kompile selects it.
- Never guess: If multiple non-owner hosts (e.g., both
github-copilotandopenrouter) could serve the family and neither is active, Kompile fails fast withAmbiguousModelRouteExceptionand asks for an explicitprovider=github-copilot.
4. Recommended subagent configuration (/subagent-config)
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.
Recommended Copilot tiering
| Role | Recommended Model | Why |
|---|---|---|
| Main agent (lead) | gpt-5.6-sol (or claude-sonnet-*) | Strong architecture, synthesis, and planning at predictable multiplier cost |
| Default subagent workers | gpt-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:
/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,bashEverything 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:
# 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.5CrossAgentResumeCompactor 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. Checkhttps://github.com/settings/copilotfor remaining premium-request quotas, while using Kompile's/costandkompile usage costfor local token and tool-call tracking. - Enterprise vs individual endpoints: If your organization runs GitHub Enterprise, always pass
--enterprise-domainduringkompile auth login github-copilotso token exchange resolves the rightproxy-ephost.