[2025-09-25] Document gh agent-task in the Copilot coding agent docs (#57677)
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com> Co-authored-by: Felicity Chapman <felicitymay@github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Asking GitHub Copilot to create a pull request
|
||||
shortTitle: Create a PR
|
||||
intro: 'You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from many places, including the agents panel, {% data variables.copilot.copilot_chat_short %}, and agentic coding tools and IDEs with Model Context Protocol (MCP) support.'
|
||||
intro: 'You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from many places, including the agents panel, {% data variables.copilot.copilot_chat_short %}, the {% data variables.product.prodname_cli %}, and agentic coding tools and IDEs with Model Context Protocol (MCP) support.'
|
||||
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=asking+copilot+to+create+a+pull+request&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
|
||||
versions:
|
||||
feature: copilot
|
||||
@@ -28,6 +28,7 @@ You can ask {% data variables.product.prodname_copilot_short %} to work on a tas
|
||||
* The agents panel, available across {% data variables.product.github %}
|
||||
* The agents page on {% data variables.product.github %}
|
||||
* {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs and {% data variables.product.prodname_dotcom_the_website %}
|
||||
* The {% data variables.product.prodname_cli %}
|
||||
* Your preferred IDE or agentic coding tool with Model Context Protocol (MCP) support
|
||||
* The Raycast launcher on macOS
|
||||
|
||||
@@ -100,6 +101,25 @@ You can ask {% data variables.product.prodname_copilot_short %} to open a pull r
|
||||
|
||||
{% data variables.product.prodname_copilot_short %} will start a new session and respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
|
||||
|
||||
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the {% data variables.product.prodname_cli %}
|
||||
|
||||
> [!NOTE]
|
||||
> The `agent-task` command set is only available in v2.80.0 or later of the {% data variables.product.prodname_cli %}. This command set is a {% data variables.release-phases.public_preview %} and is subject to change.
|
||||
|
||||
You can start a new {% data variables.copilot.copilot_coding_agent %} session with the `gh agent-task create` command in the {% data variables.product.prodname_cli %}.
|
||||
|
||||
When you run the command without any arguments, you are asked to enter a prompt. {% data variables.copilot.copilot_coding_agent %} acts on the prompt and opens a pull request in the current repository.
|
||||
|
||||
You can use command line options to:
|
||||
|
||||
* Provide the prompt (`gh agent-task create "Example prompt"`)
|
||||
* Choose a base branch, instead of using the repository's default branch (`--base`)
|
||||
* Select a repository, instead of targeting the current repository (`--repo`)
|
||||
* Follow the session log in real time (`--log --follow`)
|
||||
|
||||
|
||||
To see all of the available options, run `gh agent-task create --help`.
|
||||
|
||||
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the {% data variables.product.github %} MCP server
|
||||
|
||||
As an alternative to using {% data variables.copilot.copilot_chat_short %}, you can use the remote {% data variables.product.github %} MCP server to trigger {% data variables.copilot.copilot_coding_agent %} from any MCP host.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Tracking GitHub Copilot's sessions
|
||||
shortTitle: Track Copilot sessions
|
||||
intro: 'You can use the agents panel or page, {% data variables.product.prodname_vscode %}, Raycast and session logs to track {% data variables.product.prodname_copilot_short %}''s progress and understand its approach.'
|
||||
intro: 'You can use the agents panel or page, {% data variables.product.prodname_vscode %}, the {% data variables.product.prodname_cli %}, Raycast and session logs to track {% data variables.product.prodname_copilot_short %}''s progress and understand its approach.'
|
||||
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=using+the+copilot+coding+agent+logs&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
|
||||
versions:
|
||||
feature: copilot
|
||||
@@ -24,7 +24,7 @@ contentType: how-tos
|
||||
|
||||
After you give {% data variables.product.prodname_copilot_short %} a task, it works autonomously in the background to complete it. See [AUTOTITLE](/copilot/concepts/about-copilot-coding-agent).
|
||||
|
||||
The agents panel, [agents page](https://github.com/copilot/agents), and {% data variables.product.prodname_copilot %} extension for Raycast provide an overview of your agent sessions across repositories. You can use them to kick off new tasks and track {% data variables.product.prodname_copilot_short %}'s progress.
|
||||
The agents panel, [agents page](https://github.com/copilot/agents), the {% data variables.product.prodname_cli %}, and {% data variables.product.prodname_copilot %} extension for Raycast provide an overview of your agent sessions across repositories. You can use them to kick off new tasks and track {% data variables.product.prodname_copilot_short %}'s progress.
|
||||
|
||||
You can also track {% data variables.product.prodname_copilot_short %}'s sessions in a specific repository from {% data variables.product.prodname_vscode %}.
|
||||
|
||||
@@ -46,6 +46,19 @@ To view the session logs, click through to the pull request in the list, then fi
|
||||
|
||||
You can also start new agent sessions from the page and panel. See [AUTOTITLE](/copilot/how-tos/agents/copilot-coding-agent/asking-copilot-to-create-a-pull-request).
|
||||
|
||||
## Tracking agent sessions from the {% data variables.product.prodname_cli %}
|
||||
|
||||
> [!NOTE]
|
||||
> The `agent-task` command set is only available in v2.80.0 or later of the {% data variables.product.prodname_cli %}. This command set is a {% data variables.release-phases.public_preview %} and is subject to change.
|
||||
|
||||
You can see a list of your running and past agent sessions from the {% data variables.product.prodname_cli %} with the `gh agent-task list` command. The output will show a list of your recent sessions.
|
||||
|
||||
To see more information on a specific session, use the `gh agent-task view` command. For example, to view information about the session associated with pull request #123 in the `monalisa/bookstore` repository, run `gh agent-task view --repo monalisa/bookstore 123`.
|
||||
|
||||
To view the session logs, add the `--log` option. Optionally, use the `--follow` option to stream live logs as the agent works.
|
||||
|
||||
To see all of the available options, run `gh agent-task list --help` or `gh agent-task view --help`.
|
||||
|
||||
## Tracking agent sessions from Raycast
|
||||
|
||||
{% data reusables.copilot.coding-agent.raycast-intro %}
|
||||
|
||||
Reference in New Issue
Block a user