Skip to main content

Troubleshooting Copilot coding agent

Learn how to resolve problems that may occur when you assign tasks to Copilot.

Кто может использовать эту функцию?

Агент кодирования Copilot доступен в планах GitHub Copilot Pro+, Бизнес GitHub Copilot и GitHub Copilot Enterprise в репозиториях, где он не отключен. Агент кодирования Copilot недоступен в репозиториях, принадлежащих управляемые учетные записи пользователей.
Sign up for Copilot

Примечание.

Агент кодирования Copilot находится в public preview и подлежит изменению. Во время предварительной версии использование функции подлежит Условия лицензии GitHub Pre-release.

Copilot is not available in the "Assignees" list on my issue

You can only assign issues to Copilot if you have access to Copilot through either the GitHub Copilot Pro plan, GitHub Copilot Pro+ plan, the Бизнес GitHub Copilot plan, or the GitHub Copilot Enterprise plan.

If you do not already have a subscription for one of these plans, click this button for more information:
Sign up for Copilot

If you do have GitHub Copilot Pro, GitHub Copilot Pro+, Бизнес GitHub Copilot, or GitHub Copilot Enterprise, check that Агент кодирования Copilot is enabled and has not been manually disabled for the repository:

Примечание.

You can check whether Агент кодирования Copilot has been enabled for you in the features page of your Copilot settings: github.com/settings/copilot/features.

I have an Enterprise Managed User account and Copilot won't work in my personal repository

Агент кодирования Copilot недоступна в личных репозиториях, принадлежащих управляемые учетные записи пользователей. Это связано с тем, что Агент кодирования Copilot выполняется на GitHubразмещенных средств выполнения, которые недоступны для репозиториев, принадлежащих управляемые учетные записи пользователей. Дополнительные сведения см. в разделе About GitHub-hosted runners.

If you have an управляемая учетная запись пользователя and try to assign Copilot to an issue in a personal repository, you may see an error message reporting that GitHub Actions are not available for your repository.

To use Агент кодирования Copilot, you'll need to work with repositories owned by your organization instead of personal repositories.

Copilot can't create a pull request from Copilot Chat

If you asked Copilot to create a pull request and it responds that it cannot directly create a pull request, check that Агент кодирования Copilot is available.

Внимание

In VS Code, Visual Studio, and JetBrains IDEs, you must mention the @github chat participant in your prompt. You can omit this in Copilot Chat on GitHub.com.

I assigned an issue to Copilot, but nothing is happening

Wait a while, then refresh the page. You should see Copilot leave an 👀 reaction on the issue. Shortly after this, Copilot will open a draft pull request linked to the issue, which will be shown in the issue timeline.

Copilot has opened a pull request, but nothing is happening

If there is a "Copilot started work" event in the pull request timeline, click View session to see the session logs. These will stream live, and you will be able to see what Copilot is doing.

Copilot won't respond to my pull request comments

Copilot only responds to comments from people who have write access to the repository.

If you do have write access, and you add a comment on a pull request that is assigned to Copilot, the comment is passed to Агент кодирования Copilot. An eyes emoji (👀) is added to your comment to indicate that Агент кодирования Copilot is considering your comment. If the agent proceeds to work on making changes in response to your comment a "Copilot started work" event is added to the pull request timeline.

If this doesn't happen, Copilot may have been unassigned from the pull request, or Copilot may have decided that your comment is not actionable.

Check that Copilot is assigned to the pull request. If it is, you can force Copilot to respond to your comment by @mentioning Copilot in the comment with @copilot.

Based on the agent session logs, Copilot appears to be stuck

Copilot can appear to be stuck for a while, and then get moving again.

If the session remains stuck, it will time out after an hour. You can retry by unassigning the issue and then reassigning it to Copilot.

If Copilot got stuck while responding to a comment, try adding the same comment to the pull request again.

My GitHub Actions workflows are not running when Copilot pushes

GitHub Actions workflows will not run automatically when Copilot pushes changes to a pull request.

To allow GitHub Actions workflows to run, click the Approve and run workflows button in the pull request's merge box. See Reviewing a pull request created by Copilot.

Copilot is pushing changes which don't pass my CI checks

While working on an issue, Copilot has access to its own ephemeral development environment, powered by GitHub Actions, where it can execute automated tests and linters to validate its work before it pushes.

It is most likely to do this if given clear instructions on what to do. The best way to do this is with a .github/copilot-instructions.md file. See Best practices for using Copilot to work on tasks.

There is a warning from GitHub Copilot about the firewall

By default, Copilot's access to the internet is limited by a firewall.

Limiting access to the internet helps to manage data exfiltration risks, where surprising behavior from Copilot or malicious instructions given to it could lead to code or other sensitive information being leaked to remote locations.

If Copilot tries to make a request which is blocked by the firewall, a warning is added to the pull request body (if Copilot is responding to an issue assignment) or to a comment (if Copilot is responding to a comment). The warning shows the blocked address and the command that tried to make the request.

Screenshot of a warning from Copilot about being blocked by the firewall.

For more information, see Customizing or disabling the firewall for Copilot coding agent.

Further reading