Repository navigation
Description
Summary
We need a way for a GitHub App to mint a short-lived (≤ 6 hours) Copilot inference token so agentic workflows can consume Copilot AI Credits under a per-app budget cap, drawn from the organization's global Copilot AI Credits pool — rather than relying on the workflow-run GITHUB_TOKEN (no per-app control) or a user-owned PAT (COPILOT_GITHUB_TOKEN, seat-bound and operationally heavy).
Background
How GitHub Agentic Workflows are billed today
Running an agentic workflow (gh-aw) produces two cost streams: GitHub Actions minutes for compute, and AI inference charged by the model provider. For the default Copilot engine, there are two billing paths: [github.github.com]
Organization billing — Inference is charged as AI Credits (AIC) against the organization's Copilot tenant. Requires (1) the org policy"Allow use of Copilot CLI billed to the organization" enabled, (2) copilot-requests: write declared under permissions: in the workflow frontmatter, and (3) the compiled .lock.yml committed. [github.github.com]
Individual / seat billing — If those conditions aren't met, the workflow must be configured with a user-supplied COPILOT_GITHUB_TOKEN (fine-grained PAT). Inference is attributed to (and limited by) the PAT owner's Copilot entitlements. [github.github.com], [github.github.com]
GitHub recently removed the PAT requirement so agentic workflows can authenticate via the built-in GITHUB_TOKEN, eliminating the operational and security risks of managing long-lived PATs for automations at scale. [github.blog], [devops.com]
Current cost-control surface
gh-aw exposes runtime guardrails such as max-ai-credits and max-daily-ai-credits, enforced per workflow run. [github.github.com]
For org-level billing, GitHub's official guidance is to use cost centers (cost attribution to groups of organizations, with budgets applied to cost centers) plus the gh-aw cost-management tools to monitor and cap token usage per workflow run. The changelog explicitly notes:"User-level inference budgets are not considered when billing directly to the organization, because the cost is not attributed to a user." [github.blog]
Copilot itself moved to usage-based AI Credits billing on June 1, 2026 (1 AIC = $0.01), with included credits pooled at the billing-entity level for Business/Enterprise plans. [docs.github.com], [github.blog]
Problem
Neither billing path provides per-application budget control for agentic workflows:
GITHUB_TOKEN (org billing path) is global to the org — there is no built-in mechanism to control how many AI Credits a specific workflow or a specific GitHub App consumes from the org-wide pool. Cost centers operate at the org level, not the app level. [github.blog]
COPILOT_GITHUB_TOKEN (seat billing path) ties spend to an individual user's Copilot seat, with all the PAT lifecycle/rotation/attrition overhead, and does not represent application-level ownership. [github.github.com], [github.github.com]
max-ai-credits / max-daily-ai-credits are enforced by gh-aw at the workflow-run level, not at the GitHub App level — so a single app running many workflows across many repos can still exceed any intended app-level budget. [github.github.com]
This is a blocker for scaling agentic workflows safely across hundreds of applications/repos in a large enterprise, where we need to attribute and cap inference spend per automation system, not per user or per single run.
Proposed Solution
Allow a GitHub App to request a short-lived Copilot inference token for agentic workflow use, with the following properties:
- Token issuance by GitHub App
- GitHub App can mint a Copilot token with a configurable TTL up to 6 hours.
- Token is ephemeral, scoped to the issuing App installation, and consumable by gh-aw (or other Copilot-CLI–based runners) in place of GITHUB_TOKEN / COPILOT_GITHUB_TOKEN.
- Per-app AI Credits cap- Org admins can assign AIC caps (per-run, per-day, per-month) to each GitHub App.
- The cap draws from the organization's global Copilot AI Credits pool (not tied to any user seat).
- Once an app's cap is exhausted, further token issuance is denied with a clear error.
- Cost center attribution at the App level
- Each GitHub App can be tagged with a cost center, so all inference spend is attributed at the app level in org-wide AIC reporting — extending the current cost-center model down from org → app. [github.blog]
- Audit & observability
- Token issuance, AIC consumption, and cap breaches are logged and surfaced in the existing Copilot billing/usage reports and gh aw audit output.
Activity
pelikhan commentedon Oct 7, 2026
Status (2026-10-07; Needs progress check): The June 30 request proposes short-lived Copilot tokens minted by GitHub Apps with per-app AI Credit budgets, but the supplied record has no subsequent discussion or implementation evidence. The issue is open and needs a progress check on platform feasibility and any maintainer direction.
pelikhan commentedon Oct 16, 2026
Community issue refresher — 2026-10-16: Still relevant as a platform/integration request; platform delivery is not verified here.
The current public gh-aw contract still distinguishes organization-billed workflow credentials from user-owned Copilot tokens. Its documented spend controls include per-run and rolling daily workflow budgets. Those controls do not themselves establish an installation-wide budget shared across an app's workflows and repositories.
Likewise, gh-aw's existing GitHub App token support for repository checkout/safe-output operations is not evidence that an installation can mint a Copilot inference token with the requested TTL, app attribution, and central spend cap.
The remaining decision needs the Copilot authentication/billing platform owners: supported issuance/TTL, shared per-installation accounting and enforcement, then gh-aw credential/audit integration. Repository inspection cannot establish the status of an unannounced platform capability, so I am not claiming such issuance is technically impossible or currently available. No token issuance or billing behavior was tested.
pelikhan commentedon Oct 22, 2026
2026-10-22 assessment (corrected after platform-documentation review): partially addressed in public preview; keep open for the distinct budget, lifetime, attribution and integration requirements. Organization-installed App inference is now documented: installation-owned credentials, organization Copilot Requests: Read-only, no signed-in user, organization billing/model controls, and no dependency on the separate CLI organization-billing policy. The issuance contract requires an enabled organization and gives installation tokens a one-hour lifetime. Thus App-owned inference has a documented foundation; it is not wholly awaiting a new platform permission.
Still unmet or unverified: configurable lifetime up to six hours; shared per-App run/day/month caps across repositories; native App cost-center assignment; issuance/cap-breach auditing and authoritative spend integration. The platform explicitly says individual-App/installation budgets are unavailable. Its
app_client_idCSV attribution is useful partial observability, not native cost-center assignment or live quota enforcement. Current gh-aw activation validation rejects installation tokens in the PAT-secret path, so supported end-to-end integration also remains.The newly merged admission/completion features do not fill those gaps: the current contract is cooperative gating, not billing or a hard organization cap.
Next step: Copilot auth/runtime owners should confirm preview enablement, supported versions and credential lifecycle; billing/reporting owners should define authoritative App-wide quota, cost-center and audit contracts; gh-aw maintainers should implement the corresponding explicit credential/diagnostic integration. No target-org rollout, token issuance, inference or billing behavior was tested. This corrects the earlier authentication premise without treating organization billing as per-App budget control.