---
title: Using Copilot to work on an issue
intro: 'Learn how to assign issues to {% data variables.product.prodname_copilot %}, monitor progress as {% data variables.product.prodname_copilot_short %} works on the issue, and then use pull request review comments to prompt {% data variables.product.prodname_copilot_short %} to iterate on its work.'
product: '{% data reusables.gated-features.copilot-coding-agent %}
Sign up for {% data variables.product.prodname_copilot_short %} {% octicon "link-external" height:16 %}'
versions:
feature: copilot
topics:
- Copilot
type: how_to
redirect_from:
- /copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-issues/using-copilot-to-work-on-an-issue
---
{% data reusables.copilot.coding-agent.preview-note %}
## Introduction
You can assign a {% data variables.product.github %} issue to {% data variables.product.prodname_copilot_short %}, just like you would with a human software developer. {% data variables.product.prodname_copilot_short %} will start working on the issue, raise a pull request and when it's finished working, request a review from you. For more information, see [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot).
If you haven't used {% data variables.product.prodname_copilot_short %} to work on an issue before, you can find some useful advice for getting good results in [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks).
## Assigning an issue to {% data variables.product.prodname_copilot_short %}
You can ask {% data variables.product.prodname_copilot_short %} to start working on an issue by assigning the issue to {% data variables.product.prodname_copilot_short %}.
You can assign an issue to {% data variables.product.prodname_copilot_short %}:
* On {% data variables.product.prodname_dotcom_the_website %} (see the [next section](#assigning-an-issue-to-copilot-on-githubcom))
* Via the {% data variables.product.github %} API (see [later in this article](#assigning-an-issue-to-copilot-via-the-github-api))
* From the beta version of {% data variables.product.prodname_mobile %} ([Join iOS TestFlight](https://testflight.apple.com/join/NLskzwi5) or [Join Google Play Beta](https://play.google.com/apps/testing/com.github.android))
* Using {% data variables.product.prodname_cli %} (see [`gh issue edit`](https://cli.github.com/manual/gh_issue_edit))
### Assigning an issue to {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %}
You can assign an issue to {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %} in exactly the same way as you assign another user.
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-issues %}
1. Open the issue that you want to assign to {% data variables.product.prodname_copilot_short %}.
1. In the right side menu, click **Assignees**.

1. Click **Copilot** from assignees list.

> [!TIP]
> When you assign an issue to {% data variables.product.prodname_copilot_short %}, it gets sent the issue title, description, and any comments that currently exist. After assigning the issue, {% data variables.product.prodname_copilot_short %} will not be aware of, and therefore won't react to, any further comments that are added to the issue. If you have more information, or changes to the original requirement, add this as a comment in the pull request that {% data variables.product.prodname_copilot_short %} raises.
You can also assign issues to {% data variables.product.prodname_copilot_short %} from other places on {% data variables.product.prodname_dotcom_the_website %}:
* From the list of issues on a repository's **{% octicon "issue-opened" aria-hidden="true" %} Issues** page.
* When viewing an issue in {% data variables.product.github %} {% data variables.projects.projects_v2_caps %}.
### Assigning an issue to {% data variables.product.prodname_copilot_short %} via the {% data variables.product.github %} API
You can assign an issue to {% data variables.product.prodname_copilot_short %} by making a request to the GraphQL API.
1. Make sure you're authenticating with the API using a user token, for example a {% data variables.product.pat_generic %} or a {% data variables.product.prodname_github_app %} user-to-server token.
1. Verify that {% data variables.copilot.copilot_coding_agent %} is enabled in the repository by checking if the repository's `suggestedActors` in the GraphQL API includes {% data variables.product.prodname_copilot_short %}. Replace `monalisa` with the repository owner, and `octocat` with the name.
```graphql copy
query {
repository(owner: "monalisa", name: "octocat") {
suggestedActors(capabilities: [CAN_BE_ASSIGNED], first: 100) {
nodes {
login
__typename
... on Bot {
id
}
... on User {
id
}
}
}
}
}
```
If {% data variables.copilot.copilot_coding_agent %} is enabled for the user and in the repository, the first node returned from the query will have the `login` value `copilot-swe-agent`.
1. Fetch the GraphQL global ID of the issue you want to assign to {% data variables.product.prodname_copilot_short %}, replacing `monalisa` with the repository owner, `octocat` with the name and `9000` with the issue number.
```graphql copy
query {
repository(owner: "monalisa", name: "octocat") {
issue(number: 9000) {
id
title
}
}
}
```
1. Assign the issue to {% data variables.product.prodname_copilot_short %} using the `replaceActorsForAssignable` GraphQL mutation. Replace `ISSUE_ID` with the ID returned from the previous step, and `BOT_ID` with the ID returned from the step before that.
```graphql copy
mutation {
replaceActorsForAssignable(input: {assignableId: "ISSUE_ID", assigneeIds: ["BOT_ID"]}) {
assignable {
... on Issue {
id
title
assignees(first: 10) {
nodes {
login
}
}
}
}
}
}
```
## Tracking {% data variables.product.prodname_copilot_short %}'s progress on your issue
Shortly after you assign an issue to {% data variables.product.prodname_copilot_short %}, {% data variables.product.prodname_copilot_short %} will leave an 👀 reaction on the issue.

A few seconds later, {% data variables.product.prodname_copilot_short %} will open a draft pull request, linked to your original issue. An event will appear in the issue's timeline, linking to the pull request.

{% data variables.product.prodname_copilot_short %} will start an **agent session** to work on your issue. A "{% data variables.product.prodname_copilot_short %} started work" event will appear in the pull request timeline, and as {% data variables.product.prodname_copilot_short %} works, it will update the pull request body with regular status updates, and push commits to the branch.

If you want to check what {% data variables.product.prodname_copilot_short %} is doing, click **View session**. The session log viewer is displayed, showing you a live log as {% data variables.product.prodname_copilot_short %} works on the issue. If you want to stop {% data variables.product.prodname_copilot_short %} from working on the issue, click **Stop session**. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/using-the-copilot-coding-agent-logs).
Once {% data variables.product.prodname_copilot_short %} has finished, the agent session will end, and {% data variables.product.prodname_copilot_short %} will request a review from you, triggering a notification. In addition, a "{% data variables.product.prodname_copilot_short %} finished work" event will appear in the pull request timeline.

## Working with {% data variables.product.prodname_copilot_short %} on a pull request
After {% data variables.product.prodname_copilot_short %} has finished working on the issue, you should review the pull request thoroughly and comment on anything that needs changed. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/reviewing-a-pull-request-created-by-copilot).
## Further reading
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/best-practices-for-using-copilot-to-work-on-tasks)
* [AUTOTITLE](/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/troubleshooting-copilot-coding-agent)