Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
Runtime switching of GitHub tokens
Use this when you want to run Copilot CLI with a per-user GitHub token from Socialite or a similar authentication flow.Personal Access Tokens need the
Copilot Requests permission. The same requirement likely applies to Socialite-based user tokens.
If you cannot get a usable Socialite token, ask users to provide a PAT directly.github_token or use_logged_in_user in TCP mode (cli_url), an error is raised.
The “Per-session GitHub token (v0.3.0+)” section below is available in TCP mode as well.
github_token option
This is an official SDK option.
The SDK passes the token to CLI through COPILOT_SDK_AUTH_TOKEN.
use_logged_in_user option
When you set github_token, use_logged_in_user is automatically set to false.
This makes CLI ignore stored OAuth and gh CLI credentials and use only the explicit token.
You can also set use_logged_in_user to true explicitly:
use_logged_in_user to false without github_token, the SDK adds --no-auto-login, so CLI does not auto-login.
Per-session GitHub token (v0.3.0+)
Using thegitHubToken field in SessionConfig, you can specify a different GitHub token per session within the same CLI process (multi-tenant support).
This token is passed as a parameter in the session.create JSON-RPC call, so it is available in both stdio mode and TCP mode. Even in TCP mode where the CLI is already running, you can switch tokens per session.
github_token (the token used when launching the CLI process).
Use this when you want to switch user tokens on a per-session basis.
For the latest updates, see the GitHub repository.