Configure Copilot CLI
Run GitHub Copilot CLI using your Copilot account or a GitHub token.
Install
Section titled “Install”The agent image includes copilot from the @github/copilot package, at the version pinned by agentVersions.copilot. Configure account access in your TypeScript harness, as shown below.
Your GitHub account needs Copilot access; see GitHub’s CLI quickstart.
Sign in with your account
Section titled “Sign in with your account”Copilot always runs on your Copilot plan. Pass a fine-grained GitHub token with the Copilot Requests permission:
To reuse a host login instead, run copilot login and set authentication: "account". Outpost reads the token of the last logged-in user from ~/.copilot/config.json (or $COPILOT_HOME/config.json) and passes it to the sandbox as COPILOT_GITHUB_TOKEN.
Other credential forms and where credentials go: Authentication.
Use an API key
Section titled “Use an API key”Copilot has no API-key mode: authentication: "usage" is rejected when the agent is composed. Requests count against your Copilot plan.
Available features
Section titled “Available features”- ConversationsCaptured as a session bundle, then resumed warm or cold with
--resume. - Typed responsesAn invalid answer is repaired by resuming the same conversation.
- SteeringOutpost stops the process and resumes the session with your text.
- MCP serversPassed on each run with
--additional-mcp-config. - Usage reportingToken counts read after the run from
session-state/<id>/events.jsonl. - Quota pausesCopilot rate-limit and credit messages fail with code
quota.
API reference: CopilotSettings and createTransportConversations.
Limits
Section titled “Limits”- No automated fork: Forking a Copilot conversation is rejected; resume it instead.
- For supported model settings, see CopilotSettings.
- Classic tokens:
ghp_personal access tokens are rejected. - Incomplete usage: A missing or unreadable session file sets
usage.completetofalse, with a warning. - Late counts: Token totals can arrive after the model has spent them. Pair a budget with a timeout.
- Premium requests: Copilot bills premium requests;
usagereports tokens, not premium requests. - MCP options:
startupTimeoutMsandoauthare rejected; authenticate HTTP servers withbearerTokenVariable.
API: createCopilotHarness · CopilotSettings · createCopilotConversations.