# Copilot Fix Failing GitHub Actions: Setup and Review Rules

> What the Fix with Copilot button on a failed Actions run does, what an admin must enable, why its pushes do not run your checks by default, and how to review the result.

URL: https://www.matthewswong.com/en/blog/copilot-cloud-agent-fix-failing-github-actions/

- Author: Matthews Wong (https://www.matthewswong.com/en/about/)
- Published: 2026-10-17
- Updated: 2026-10-17
- Category: DevOps

> **Key takeaway:** Fix with Copilot on a failed GitHub Actions run asks Copilot cloud agent to investigate in its own environment, push a fix to the branch and tag you for review. On Business and Enterprise an admin must enable the agent first. Its pushes do not run workflows until someone approves them, so review the diff, not the green tick.

A red check on a pull request at 18:40 is the classic small tax: the fix is usually a lockfile, a lint rule or a test that moved, and it still costs a context switch. GitHub has now put a button on exactly that moment. Fix with Copilot sits on the failed run, and since July it sits on the failed check in GitHub Mobile too.

I have not run this on a production repository, so this is not a field report. It is a close reading of three GitHub changelog entries and four documentation pages, with every claim traced to a page I opened on 17 October 2026. Where the sources are silent, for example on cost, I say so rather than fill the gap. Claude Code has its own Actions integration, covered in the Claude Code GitHub Actions guide; this post is only about Copilot cloud agent.

## What the button does, and the three dates it grew

The first entry is dated 18 May 2026. It adds a Fix with Copilot button to the workflow run logs page. Clicking it asks Copilot cloud agent to fix the failed job: the agent investigates in its own cloud-based development environment, pushes a fix to your branch and tags you for review. The launch audience was Copilot Business and Copilot Enterprise.

On 4 June 2026 a second entry extended the same button to Copilot Pro, Pro+ and Max subscribers. On 23 July 2026 GitHub Mobile gained it on the failed check of a pull request, with one difference worth noticing: Copilot opens a new pull request on top of your existing one rather than pushing into it, then tags you for review. The mobile entry names iOS and Android and does not say which plans qualify.

The documentation page for the desktop flow is short. The requirement is that the workflow run fails on a pull request branch. The steps are to open the job page for the failing run and click Fix with Copilot, after which Copilot starts a new session, looks into the cause and sends a fix to your branch. None of the four pages I read lists retry rules or a usage quota for this button.

## What an admin has to switch on first

On Business and Enterprise the button is not yours to enable. The May entry says an administrator must turn on Copilot cloud agent before you can delegate to it. In the enterprise docs the path is AI controls, then Agents, then Copilot Cloud Agent under Available agents, where you pick a global policy. The page states the agent is disabled by default.

Scope has two levels. If you choose Enabled for selected organizations, you pick the organizations in the UI, and selecting them by custom properties needs the REST API. By default the agent is then available in every repository of those organizations; owners can block specific repositories at the organization level, and repository owners and administrators can disable it for a particular repository.

Rules can also lock the agent out. The about page warns that incompatible rulesets or branch protection rules can block its access, and that administrators can grant Copilot a bypass actor role. I would decide that bypass question deliberately, because it decides whether the agent can push at all on a protected branch. The June entry for Pro, Pro+ and Max lists only a qualifying plan and a failed job with logs as requirements; it names no admin step, and I did not find one documented for those plans.

> Pilot it on one low-risk repository before the enterprise-wide switch. The enablement page itself suggests a trial first, and a single repository tells you quickly whether your rulesets let the agent push.

## What it pushes, where, and what it cannot touch

The risks page is the clearest statement of the write path. The agent can push to only one branch. If it was triggered by mentioning @copilot on a pull request, it writes to that pull request's branch; otherwise it creates a new copilot branch. Branch protections and required checks still apply, and the agent cannot run git push or other git commands directly. The about page adds that Copilot works on one branch at a time and opens one pull request per task.

Two limits matter for CI work. Each session has a maximum execution time of 59 minutes, which the page says cannot be extended or bypassed, so a failure that needs an hour of integration tests to reproduce is outside what this button can do. And only repositories hosted on GitHub are supported. The table puts the three ways of getting help on a failed run side by side, using only what the sources state.

Fix with Copilot, run logs page

Starts a cloud agent session, pushes a fix to your branch, tags you

Business and Enterprise (18 May); Pro, Pro+ and Max (4 June)

Fix with Copilot, GitHub Mobile

Opens a new pull request on top of the failing one, tags you

Not stated in the 23 July entry

Explain error, merge box or run summary

Opens a Copilot chat with instructions; changes nothing in the repository

Counts against the monthly chat limit on Free

Mention @copilot on a pull request

Agent writes to that pull request's branch

Needs write access to the repository

Explain error is the lower-risk sibling. It only opens a chat window where Copilot gives instructions to resolve the issue, so nothing is pushed. I would use it first whenever I do not yet know whether the failure is code or infrastructure.

## Give the agent the same environment your CI has

The agent runs in its own environment, and a fix it cannot test is a guess. The customisation docs describe a workflow file at .github/workflows/copilot-setup-steps.yml. It only triggers once it is on the default branch, and it must contain a single job named copilot-setup-steps, or Copilot will not pick it up. Only these keys in that job are honoured: steps, permissions, runs-on, services, snapshot and timeout-minutes.

Three behaviours from the same page are worth knowing. timeout-minutes has a maximum of 59. A fetch-depth you set on actions/checkout is overridden so the agent can roll back commits. And if a setup step exits non-zero, the remaining steps are skipped and Copilot starts with whatever state the environment reached, so a failed npm ci does not stop the session, it quietly gives you an agent without dependencies. The example below uses only the honoured keys; the install commands are mine, for a Node project.

The same page says the agent supports Ubuntu x64 Linux and Windows 64-bit runners only, and that self-hosted runners need Copilot's integrated firewall disabled because it is not compatible with them. If your failing job runs on macOS, the agent cannot reproduce it.

## The approval gap: its pushes do not run your checks

This is the part I would brief the whole team on. The Copilot documentation says that by default GitHub Actions workflows do not run automatically when Copilot pushes changes to a pull request; you may need to click Approve and run workflows in the merge box. The risks page frames it as a mitigation: workflows do not run until the code is reviewed and a user with write access clicks that button, with an option to allow automatic runs.

The consequence is a trap for anyone who reads status at a glance. After the agent pushes, the pull request can still show the old red check or no fresh check at all, depending on how your branch protection is set up. The fix has not been verified by your CI yet. The commands below ask the question that matters: did a run happen on the commit the agent pushed, and what did it conclude.

> Do not merge on the strength of a stale result. Confirm that a run exists for the head commit of the agent's push, and click Approve and run workflows only after you have read the diff, since that click executes agent-authored workflow code with your repository's permissions.

## Review rules that keep the fix honest

GitHub's review controls are on your side here, and they are specific. A human must review and merge pull requests the agent opens; it cannot mark them ready, approve them or merge them. The user who asked Copilot to create a pull request cannot approve it. If a pull request is not attributed to a person and the repository requires at least one approval, one more approval is required. That extra approval is on by default in rulesets, where admins can turn it off, and always applies to branch protection rules.

The table maps each control from the risks page to the failure it addresses. The CODEOWNERS file after it is my addition, not something the sources prescribe: it makes sure the files an agent could weaken to get a green check always need a named human.

One branch only

Pushes to the PR branch or a new copilot branch; no direct git commands

Says nothing about which files in that branch it may edit

Workflow approval

Workflows wait for a write-access user to approve

Approval executes agent-written workflow changes if you do not read them

Independent review

Requester cannot approve; the agent cannot merge

A second reviewer can still approve a diff they skimmed

Write access to trigger

Comments from users without write access never reach the agent

Content in logs and in the repository itself is still input

The last row is why I read the risks page with some care. The agent reads failing job logs, and logs echo whatever your tests and tools print. The page documents filtering of hidden characters in issues and comments, but I found no statement about log content, so I treat logs as untrusted input and keep the agent's token scope small.

## Where this goes wrong: green by weakening

The cheapest way to turn a red check green is to change the check. A test is skipped, a lint rule is relaxed, a timeout is raised, a workflow condition is loosened. The sources do not report the agent doing this; they do say output may be incorrect or insecure, that logs do not replace your own review and testing, and that you should review and test the output before using it in production. I read that as a prompt to look for exactly this shape of change.

So I review the agent's diff in a fixed order: first anything under the workflow directory and the test directories, then dependency files, then the source change that was supposed to be the fix. A fix that mostly lives in the first two groups is a change to the definition of success, and deserves the question of why the code itself did not need to change.

The other limits are structural. Failures caused by an expired secret, a flaky third-party service or a runner outage are not code problems, and an agent session that spends its 59 minutes on them produces a plausible patch for the wrong cause. Read the first failing step yourself before you press the button, and press it for failures that are about code.

## What to do on Monday

Five steps, in order, each small enough to finish in an afternoon.

1. Ask the enterprise or organization admin whether Copilot cloud agent is enabled, and on which repositories. On Business and Enterprise it is disabled by default.
2. Add copilot-setup-steps.yml to the default branch with the same toolchain and install step as your CI, and run it once by hand to confirm it succeeds.
3. Decide the ruleset question: does Copilot get a bypass actor role, and is the extra-approval rule left on for agent-authored pull requests.
4. Add CODEOWNERS entries for the workflow and test directories so the files an agent could weaken always need a named reviewer.
5. Write the review order from the previous section into your pull request template, and make approving the workflow run an explicit, post-diff step.

After the first agent fix, check whether a run happened on its head commit, and note the cost. The pages I read describe usage only by link to a billing page, so I cannot tell you what a session costs; look at your own billing and usage before you widen the rollout.

Fix with Copilot is a good delegation for failures that are plainly about code, and a poor one for failures about the world around it. The rule I would carry is this: the agent may propose a fix, but your CI has to verify it, and a human has to read what changed in the checks themselves before anything merges.

## Sources, all opened and checked on 17 October 2026

- GitHub changelog, 18 May 2026: one-click fixes for failing Actions with Copilot cloud agent
- GitHub changelog, 4 June 2026: Fix with Copilot for failing Actions now in Pro, Pro+ and Max
- GitHub changelog, 23 July 2026: GitHub Mobile, fix failing Actions checks with Copilot cloud agent
- GitHub Docs: use Copilot cloud agent on GitHub, fixing a failing workflow run
- GitHub Docs: risks and mitigations for Copilot cloud agent
- GitHub Docs: enable Copilot cloud agent for an enterprise
- GitHub Docs: customize the agent environment with copilot-setup-steps.yml
- GitHub Docs: using Copilot to troubleshoot workflows (Explain error)
- GitHub Docs: about Copilot cloud agent, limitations and session timeout

## Source links

- https://github.blog/changelog/2026-05-18-one-click-fixes-for-failing-actions-with-copilot-cloud-agent/
- https://github.blog/changelog/2026-06-04-fix-with-copilot-for-failing-actions-now-in-pro-pro-and-max/
- https://github.blog/changelog/2026-07-23-github-mobile-fix-failing-actions-checks-with-copilot-cloud-agent/
- https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/use-cloud-agent-on-github
- https://docs.github.com/en/copilot/concepts/security-governance-and-network-settings/risks-and-mitigations
- https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/enable-copilot-cloud-agent
- https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment
- https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/using-copilot-to-troubleshoot-workflows
- https://docs.github.com/copilot/concepts/agents/cloud-agent/about-cloud-agent

## FAQ

### What does the Fix with Copilot button on a failed GitHub Actions run do?

It asks Copilot cloud agent to fix the failed job. The agent investigates in its own cloud-based environment, pushes a fix to your branch and tags you for review. It only attempts a fix; merging stays your decision.

### Who can use Fix with Copilot for failing Actions?

It launched on 18 May 2026 for Copilot Business and Enterprise, and a 4 June 2026 entry extended it to Pro, Pro+ and Max. On Business and Enterprise an administrator must enable Copilot cloud agent first, and it is disabled by default at enterprise level.

### Why did my CI not run after Copilot pushed a fix?

By default GitHub Actions workflows do not run automatically when Copilot pushes to a pull request. A user with write access must click Approve and run workflows in the merge box. Read the diff first, because that click runs agent-authored workflow code.

### How does Fix with Copilot work in GitHub Mobile?

Since 23 July 2026 you can select Fix with Copilot on a failed check of a pull request in the iOS or Android app. Copilot opens a new pull request on top of your existing one, tries a fix and tags you for review. The entry does not say which plans qualify.

### Can Copilot cloud agent merge its own fix or approve it?

No. A human must review and merge the pull requests it opens, and it cannot mark them ready, approve or merge them. The person who asked for the pull request also cannot approve it, and branch protection and required checks still apply.

---

- HTML version: https://www.matthewswong.com/en/blog/copilot-cloud-agent-fix-failing-github-actions/
- Bahasa Indonesia: https://www.matthewswong.com/id/blog/copilot-cloud-agent-fix-failing-github-actions/
- Site index for agents: https://www.matthewswong.com/llms.txt
- Sitemap: https://www.matthewswong.com/sitemap.xml
- API description (OpenAPI): https://www.matthewswong.com/openapi.json
