Study FAQ
When can a GitHub Agentic Workflow use GITHUB_TOKEN for Copilot inference?
Also asked as 2
- Which repository, Copilot plan and policy let gh-aw use GITHUB_TOKEN for inference?
- What must be enabled before the gh-aw Copilot engine can authenticate with the Actions token?
Answer
A GitHub Agentic Workflow can use the built-in GITHUB_TOKEN for Copilot inference when it uses the Copilot engine in an organization-owned repository with a Copilot plan and the applicable organization billing policy enabled. The workflow must explicitly declare copilot-requests: write; that permission authorizes inference rather than repository mutation.
An organization administrator enables the policy allowing Copilot CLI usage billed to the organization. The workflow author then opts in through frontmatter:
permissions:
contents: read
copilot-requests: write
Choose only the repository read scopes required by the task. The compiler does not add the inference permission as a default. In this mode, the built-in Actions token is used for inference and Copilot token-secret values are ignored for those calls.
Personal repositories and third-party engines use their documented token or API-key route. Store required values as approved secrets, never in workflow prose or source control. Check the selected engine, repository owner, policy and actual authentication result before calling the workflow runnable.
If inference fails, preserve its diagnostic and correct the demonstrated authentication or policy problem. Adding repository write permissions does not supply missing Copilot entitlement. A successful model call still needs separate input-access and business-output verification.
References: Creating GitHub Agentic Workflows - GitHub Docs, GitHub Tools Read Permissions.
Full explanation
GH-700: Author and Compile GitHub Agentic Workflows
Study guide · GH-700
Read the full explanation