Covendocs

Copilot CLI Harness

Copilot CLI harness deep dive: setup, provider auth, launch arguments, permission mapping, and troubleshooting.

2 min read

Copilot CLI is GitHub's coding-agent CLI. Coven launches it as a project-rooted PTY and records the run as a Coven session.

FieldValue
Harness idcopilot
Executablecopilot
Installnpm install -g @github/copilot or brew install --cask copilot-cli
Provider authcopilot login
First runcoven run copilot "summarize this repo"

Setup

npm install -g @github/copilot
copilot login
coven doctor

coven doctor checks that copilot is available on PATH. It does not read GitHub credentials.

Launch

coven run copilot "audit this repo" --cwd packages/cli --title "CLI audit"

Copilot rejects positional prompts, so Coven always passes the prompt through a flag: --prompt for non-interactive one-shots and --interactive for interactive sessions with an initial prompt. Non-interactive launches also add --no-color because Copilot colorizes whenever it sees a TTY and Coven runs those launches under a PTY.

Other flags Coven maps for you:

Coven optionCopilot argv
--model <id>--model <id> (auto lets Copilot pick)
--permission full--allow-all
--permission read-only--deny-tool write --deny-tool shell (deny rules beat every allow rule; reads stay allowed)
--add-dir <dir>--add-dir <dir> (repeatable)
--think / --speed--effort <level>
Session continuity--session-id <uuid> for both fresh launches and resumes

Copilot has no system-prompt flag, so familiar identity is injected as a bracketed preamble prepended to the prompt. Copilot does not support Coven's long-lived stream-json input mode; runs are one-shot --prompt launches.

Supervision flow

Rendering diagram…

Common failures

SymptomLikely causeFix
coven doctor reports Copilot missingcopilot is not on daemon PATHInstall Copilot CLI, restart daemon, rerun doctor.
Copilot asks for loginGitHub auth state expired or missingRun copilot login.
Launch rejects cwd--cwd escapes the project rootUse a cwd inside the project.
Writes fail in read-only runs--permission read-only denies the write and shell toolsRerun with --permission full when mutation is intended.

For shared setup rules, see Install harness CLIs and Provider auth boundary.

Was this page helpful?No

Last updated on

On this page