GitHub Copilot CLI
Operating GitHub Copilot CLI on workers — GitHub sign-in or token, the flags a headless run needs, add-on models through COPILOT_PROVIDER_BASE_URL.
Install
npm install -g @github/copilotThe worker looks for copilot on the worker user's PATH.
Sign-in
Start copilot once as the worker's user and run /login, or put COPILOT_GITHUB_TOKEN (or GH_TOKEN) in the
task's environment profile. Without either a run ends with "No authentication information found".
How it runs
copilot --allow-all-tools --no-ask-user --no-auto-update --no-color --output-format json [--model <model>] [--add-dir <dir>] -p <prompt>
--allow-all-toolsis required for non-interactive mode, and--no-ask-userkeeps it from waiting for an answer.--no-auto-updatekeeps the version the worker reported from changing under a running task.- Projects with several repositories reach it: the other repositories are passed with
--add-dir.
Add-on models
Copilot CLI has a custom-provider mode: with COPILOT_PROVIDER_BASE_URL set it uses that endpoint instead of
GitHub's model routing and needs no GitHub login. The worker sets COPILOT_PROVIDER_BASE_URL,
COPILOT_PROVIDER_TYPE, COPILOT_PROVIDER_API_KEY and COPILOT_MODEL for gateway sessions, and the same
variables for the providers it uses directly (OpenAI, OpenAI-compatible, Ollama, Anthropic). A complete task was
run for the gateway and for each of those four against a test endpoint.
Sessions
Resume is not claimed for GitHub Copilot CLI: no resume command could be verified without an account. After a crash, recovery starts a fresh session from the checkpoint.
What was verified
Checked against GitHub Copilot CLI 1.0.92 on 2026-10-06: its --help, and a real run without credentials
through the worker's session runtime. It also completed a task through the model gateway against a test model.