Skip to main content

Research, plan, and iterate on code changes with Copilot cloud agent

Perform deep research on a repository, create an implementation plan, and make iterative code changes on a branch, then create a pull request when you're ready.

Qui peut utiliser cette fonctionnalité ?

Copilot, agent de codage est disponible avec les forfaits GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business et GitHub Copilot Enterprise. L'agent est disponible dans tous les référentiels stockés sur GitHub, à l'exception des référentiels appartenant à comptes d’utilisateur managés et où il a été explicitement désactivé.
Sign up for Copilot

Introduction

You can use Copilot cloud agent (formerly Copilot coding agent) to:

  • Perform deep research on a repository by asking Copilot questions.
  • Plan and refine an approach before Copilot makes changes.
  • Iterate on code changes on a branch, review a diff, and get Copilot to only create a pull request when you're ready.

Copilot cloud agent won't automatically open a pull request as part of the session. If you do want Copilot to open a pull request for your task right away, you can explicitly ask for one in your prompt. For example, by stating "Create a pull request to ...".

Remarque

Deep research, planning, and iterating on code changes before creating a pull request are only available with Copilot cloud agent on GitHub.com. Cloud agent integrations (such as Azure Boards, JIRA, Linear, Slack, or Teams) only support creating a pull request directly.

Performing deep research

You can ask Copilot cloud agent questions about a repository to understand how it works, identify where to make a change, or confirm assumptions before planning and implementation. Copilot starts a deep research session to examine the repository and return a grounded answer.

  1. Open the agents panel or tab:

    • Open the Agents tab in a repository.
    • Navigate to the agents page: Go to github.com/copilot/agents. You can also get here by opening the agents panel, then clicking View all.
    • Open the agents panel: Click in the navigation bar at the top right of GitHub.
  2. Ask a question about the repository.

    For example: Investigate performance issues in this app and suggest improvements.

    Conseil

    Alternatively, open Copilot Chat and attach the relevant repository as context, then ask Copilot Chat to do research. You will be prompted to approve a deep research session.

  3. Optionally, send additional prompts while Copilot is working to steer the session.

  4. Review the response and ask follow-up questions.

Creating a plan

You can ask Copilot cloud agent to propose a plan before making changes, simply by prompting the agent.

  1. Ask the agent to create a plan.

    For example: Create a plan to implement the most impactful performance improvements for this app.

  2. Review the plan and iterate with Copilot until it matches what you want.

Iterating on code changes

After research and planning, you can make changes on a branch, review the diff, and then decide whether to iterate more or create a pull request.

  1. Ask the agent to implement changes by describing what you want Copilot to do in your prompt.

    For example, you might reference the plan you designed earlier: Implement the plan we agreed upon.

  2. Copilot starts a session to make the required changes.

  3. Once the session completes, click Diff to review the changes.

  4. Optionally, open the branch (copilot/BRANCH-NAME) that Copilot created to inspect the changes in context.

  5. If you want refinements, you can continue the conversation and ask the agent to adjust the work. For example: Rename this to match our existing conventions.

  6. Continue iterating until you’re satisfied with the branch.

  7. Once you're happy with the results, and when the session is complete, click Create pull request.

Further reading