The Copilot provider lets Koan use GitHub Copilot's CLI as the underlying AI agent. This is useful if you have a Copilot subscription and want to use it instead of (or alongside) Claude.
Copilot CLI is available as a standalone binary or via the GitHub CLI extension.
Option A: Standalone binary (preferred)
# macOS (Homebrew)
brew install github/gh/copilot
# Verify
copilot --versionOption B: Via GitHub CLI
# Install gh if needed
brew install gh
# Install the Copilot extension
gh extension install github/gh-copilot
# Verify
gh copilot --versionKoan auto-detects which variant is available, preferring the standalone
copilot binary over gh copilot.
# Standalone
copilot auth login
# Or via gh
gh auth loginYou need a GitHub account with an active Copilot subscription (Individual, Business, or Enterprise).
In config.yaml:
cli_provider: "copilot"Or via environment variable (in .env):
KOAN_CLI_PROVIDER=copilot# Standalone
copilot -p "Hello, what model are you?"
# Or via gh
gh copilot -p "Hello, what model are you?"You can use Copilot for specific projects while keeping Claude as the
default. In projects.yaml:
defaults:
cli_provider: "claude" # Default for all projects
projects:
my-github-project:
path: "/path/to/project"
cli_provider: "copilot" # This project uses CopilotCopilot CLI has some differences from Claude Code CLI that affect behavior:
| Feature | Claude Code | Copilot CLI |
|---|---|---|
| Tool naming | Bash, Read, Write |
shell, read_file, write_file |
| Tool restriction | --allowedTools / --disallowedTools |
--allow-tool (per tool) |
| Fallback model | --fallback-model |
Not supported |
| Output format | --output-format json |
Not supported |
| Max turns | --max-turns N |
Not supported |
| MCP support | Yes | Yes (same config format) |
| Model selection | --model <name> |
--model <name> |
Koan handles these differences transparently through the provider abstraction — you don't need to worry about flag translation.
Koan automatically translates tool names between providers:
| Koan (canonical) | Claude Code | Copilot |
|---|---|---|
Bash |
Bash |
shell |
Read |
Read |
read_file |
Write |
Write |
write_file |
Edit |
Edit |
edit_file |
Glob |
Glob |
glob |
Grep |
Grep |
grep |
- No fallback model: Copilot doesn't support
--fallback-model. If the primary model is unavailable, the request fails. - No output format control: Copilot always returns plain text. Koan parses output as-is instead of using structured JSON.
- No max turns: Copilot conversations run until the model's response is complete. Koan cannot limit tool-use rounds.
- Tool restriction is allow-list only: Copilot uses
--allow-tool <name>per tool. When Koan needs to disallow specific tools, it computes the inverse (allow everything except the disallowed ones).
Copilot model selection works the same way as Claude:
models:
mission: "" # Empty = default Copilot model
chat: ""
lightweight: "" # Copilot may not support all model tiersAvailable models depend on your Copilot subscription tier. Check Copilot documentation for current model availability.
Install the CLI (see Quick Setup above). If using gh copilot, make
sure both gh and the Copilot extension are installed.
# Re-authenticate
gh auth login
# Check status
gh auth statusCopilot CLI requires an active GitHub Copilot subscription. Check your subscription at https://github.com/settings/copilot.