Playbooks · Teams tasks
Budget agentic autofix before you enable it
Written November 1, 2026
A security team on Enterprise Cloud needs the credit and minutes budget for agentic autofix before enabling it, and a review routine for the draft pull requests it opens — knowing the fix is best-effort and some alerts cannot be confirmed fixed.
Before you start
Agentic autofix became generally available on October 15, 2026. When an alert is assigned to Copilot, Copilot explores the relevant files, proposes a fix, reruns CodeQL to confirm the fix closes the alert, and opens a draft pull request for review, per the GitHub changelog. It is available to GitHub Code Security and GitHub Advanced Security customers on GitHub Enterprise Cloud, including Enterprise Cloud with data residency. An enterprise administrator must enable access through the new Agentic autofix policy in Advanced Security policies, and an organization or repository administrator then turns it on in Code Security settings. Access also requires a Copilot billing method. No GitHub Copilot licence is needed for the person assigning an alert, per GitHub's docs. Agentic autofix is not available for repositories in the personal namespace of a managed user account.
Agentic autofix is one of two autofix experiences, and the difference decides the budget. Copilot Autofix generates one suggested code change for one alert, which the reader reviews and applies; its suggested fixes do not consume AI credits. Agentic autofix investigates one or more alerts end to end and opens the draft pull request itself, and each assignment starts an agent session that consumes AI credits and GitHub Actions minutes. When agentic autofix is enabled, it replaces the free Generate Fix option on individual code scanning alerts with an Assign to Copilot button. Enabling it therefore changes a free, one-at-a-time action into a metered agent session. Set the budget first.
Set the budget before enabling
Agentic autofix consumes two meters: AI Credits from the Code Security budget, and GitHub Actions minutes, per the changelog. AI credit usage appears in the AI usage section of enterprise billing and licensing, under the Advanced Security product. GitHub publishes no per-alert price in the changelog or the billing pages linked below, so budget from the meters and from a small first batch, not from a per-fix figure. GitHub's billing docs add one ordering rule that matters for the first run: if the billed account has included AI credits from a GitHub Copilot entitlement, eligible usage draws from that allowance first, and further usage is metered after the allowance is exhausted. If the account has no included AI credits, all usage is metered. Before enabling broadly, the billing administrator should review the included credits and set a hard budget to cap metered usage, per the billing docs.
Set a SKU-level budget for the Code Security AI credits SKU: in the billing pages, a SKU-level budget picks a product and then a SKU, and for this feature the product is Advanced Security and the SKU is Code Security AI Credits. Turn on the option to stop usage when the budget limit is reached, where the account offers it. Note the limit's exact behaviour for Advanced Security, from the billing docs: the Limit usage option prevents new enablement of Advanced Security, and does not disable it on repositories where it is already active. Repositories already enabled keep functioning, and their active committers are still counted and billed. A budget therefore caps new exposure; it does not switch off a repository that is already running. Set a separate budget for GitHub Actions minutes the same way, since the agent session's CodeQL reruns consume minutes on top of the credits. Avoid overlapping product-level and SKU-level budgets for the same spend: GitHub's budget guidance says usage counts toward every applicable budget, and any exhausted budget with stopping turned on blocks further use.
Assign one small batch, then review the draft
- Enable in one repository first. Enterprise policy first, then organization or repository Code Security settings, with the Copilot billing method in place. One repository with a small alert backlog is the pilot; an enterprise-wide enablement before the first bill is the mistake this page exists to prevent.
- Assign one alert, or a small batch. From any code scanning alert on the repository's default branch, assign the alert to Copilot. From the alert list or a security campaign, select up to 25 alerts for Copilot to fix together in a single pull request. One assignment creates one agent session and one pull request for the selected alerts. Start with one alert, so the first bill is one session, not twenty-five. Alerts detected only on pull requests or other branches cannot be assigned to Copilot: agentic autofix works on default-branch backlog alerts only. The REST API route sets the alert's assignees to
["copilot-swe-agent[bot]"]. - Read the draft pull request as a claim, not a result. The pull request includes a summary of the fix, why it closes the alert, and the validation steps Copilot took. Read all three. If the pull request says Copilot could not validate the fix, or thinks the alert might be a false positive, it says so in the pull request, per GitHub's docs — treat that as an open question, not as a closed alert.
- Check the fix against fresh CodeQL evidence. Copilot validates fixes by re-running CodeQL with the code scanning query suite, on a best-effort basis. It cannot confirm fixes for alerts from custom CodeQL queries, the
security-extendedquery suite, or code scanning alerts from third-party tools, per GitHub's docs. For those alerts, the draft pull request carries no confirmed closure: the reviewer must run the relevant check themselves, or treat the alert as still open. For standard CodeQL alerts, read the validation steps in the pull request and confirm the alert is closed in the repository's code scanning view before approving. - Review and test before merging. GitHub's docs state it plainly: always review and test the generated changes before merging the pull request. Check the change the way a teammate would review a fix: the diff, the tests, and the behaviour the alert described. Comment on the pull request or use the Agents tab to ask Copilot for further changes; only a human approval merges it.
- Read the first bill before widening the batch. After the pilot batch, read AI credit consumption under the Advanced Security product and the Actions minutes used, compare both against the budgets set above, and only then raise the batch size or enable more repositories. A batch of 25 alerts is one session, but a large codebase exploration inside that session is not a fixed price.
What can go wrong
- Enabling everywhere before the budget exists. The feature replaces the free Generate Fix button once enabled. Without a SKU-level budget and a minutes budget in place, the first assignments spend metered credits with no cap. Fix: set both budgets before the first enablement.
- Assigning alerts from a pull request or another branch. Those alerts cannot be assigned to Copilot. The work stays with the reader, and the alert must be fixed on the default branch or by hand.
- Treating a draft as a confirmed fix for a custom query. Copilot cannot confirm fixes for custom CodeQL queries, the security-extended suite, or third-party tool alerts. Merging on the strength of the draft alone leaves the alert's closure unproven.
- Reading the budget limit as an off switch. For Advanced Security, reaching the limit prevents new enablement; it does not disable repositories already enabled. A team that expects spend to stop at the limit will still be billed for enabled repositories.
- Letting the agent session be the only reviewer. The draft pull request is the agent's own account of its work. A fix that passes its own rerun can still be wrong in context. The human review in step 5 is the control, not a formality.
Limits
- Agentic autofix works on a best-effort basis. GitHub's docs say Copilot validates fixes by re-running CodeQL, and that it cannot confirm fixes for custom queries, the security-extended suite, or third-party tool alerts. No fix-quality rate is stated in the pages linked below, and none is claimed here.
- No per-alert price is stated in the changelog or billing pages linked below. Any budget figure a team uses must come from its own pilot batches and its own billing pages, not from this page.
- Availability in this page follows the October 15, 2026 changelog: GitHub Code Security and GitHub Advanced Security customers on GitHub Enterprise Cloud. Repositories outside that scope should be compared with GitHub's eligibility docs before any enablement step.
- Custom instructions that apply to Copilot apply when it generates a fix, per GitHub's docs. A repository without written custom instructions gives the agent no standing rules for the fix.
Related playbooks
- DHS DeepSeek order: inventory your stack
- Run Claude Managed Agents in your own cloud
- Baseten Grid routes coding-agent traffic
- Dots switch on by default on November 18
Sources
Sources: GitHub Changelog: agentic autofix general availability, About autofix for code scanning, Resolving code scanning alerts (Enterprise Cloud), GitHub Advanced Security license billing, Setting up budgets to control spending on metered products.
Back to: Small-team playbooks hub · Also: Review a pull request with a coding agent · Review your own code for security issues with Claude Code