Learn › GitHub Copilot Mastery › The Coding Agent: From GitHub Issue to Pull Request

The Coding Agent: From GitHub Issue to Pull Request

Intermediate 🕐 14 min Lesson 8 of 13
What you'll learn
  • Distinguish the async Coding Agent from synchronous Agent mode in the IDE
  • Assign a GitHub Issue to the Coding Agent and understand the execution sequence it follows
  • Create a copilot-setup-steps.yml file to give the Coding Agent a configured environment

The Coding Agent Is Not Agent Mode

This distinction is important enough to state at the start of the lesson. GitHub Copilot has two things with "agent" in the name, and they are fundamentally different tools:

  • Agent mode (IDE) — Synchronous. You are present. The agent works in your VS Code window, shows you each step, and waits for your approval on risky actions.
  • Coding Agent (GitHub.com) — Asynchronous. You are not present. The agent works entirely in the cloud inside a GitHub Actions runner. It writes code, runs tests, pushes commits, and opens a draft PR — all without your IDE being open.

The Coding Agent is your asynchronous peer programmer. Assign it an issue, walk away, and review the pull request it opens. This is the feature that most changes how solo developers and small teams operate.

How to Assign an Issue to the Coding Agent

From a GitHub Issue page, click the Assignees field and select Copilot from the list of assignees. Within seconds, the Coding Agent picks up the issue, creates a branch (named after the issue), and begins working.

You can also assign work from:

  • GitHub.com Agents tab — Navigate to your repository's Agents tab and create a task directly
  • Jira — Assign a Jira issue to Copilot if your org has the Jira integration (public preview since March 2026)
  • @copilot in a PR comment — Mention @copilot in a review comment asking it to fix a failing check or address feedback

What Happens When the Agent Runs

The agent's execution environment is a GitHub Actions runner — the same infrastructure that runs your CI pipeline. The sequence is:

  1. The agent reads the issue title, description, and comments
  2. If a copilot-setup-steps.yml file exists in .github/workflows/, the runner runs those steps to configure the environment (install Node.js, install dependencies, set up test databases, etc.)
  3. The agent reads your custom instructions from .github/copilot-instructions.md
  4. It plans the changes needed, edits files, runs tests, fixes errors, and iterates
  5. When satisfied, it pushes the commits to the branch and opens a draft pull request requesting your review

Since March 2026, the agent starts work approximately 50% faster than it did at launch. For most issues, the draft PR appears within a few minutes of assignment.

Setting Up copilot-setup-steps.yml

Without a setup steps file, the agent works in a bare environment. It can still read and edit files, but it cannot run your tests if your project requires a specific Node version, installed packages, or a running database. Create .github/workflows/copilot-setup-steps.yml:

name: 'Copilot Setup Steps'
on:
  workflow_dispatch:
    inputs:
      copilot-setup-steps-only:
        required: true
        type: boolean

jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm ci

Commit this file and the agent will use it to set up its environment before starting work.

Working With the Draft PR

When the agent opens the draft PR, review it like any other PR. You will see all the commits the agent made, the tests it ran, and its own description of what it did. You can:

  • Approve and merge the changes as-is
  • Leave review comments and mention @copilot — the agent will address the feedback directly on the existing branch
  • Edit the code yourself on the branch
  • Close the PR if the approach is wrong and reassign the issue with a more detailed description

Availability and Admin Setup

The Coding Agent is available on all paid Copilot plans (Pro, Pro+, Max, Business, Enterprise). For Business and Enterprise accounts, an organisation administrator must enable the Coding Agent in the organisation's Copilot settings before users can assign issues to it.

Try This

Find a small, well-scoped issue in one of your GitHub repositories — a bug fix, a missing test, or a minor feature. Write a clear issue description that explains the expected and actual behaviour. Assign it to Copilot. Then do something else for 10-15 minutes and come back to review the draft PR it opened. Read every commit and the test output before you approve anything.

Key takeaways
  • The Coding Agent is fully asynchronous and runs in GitHub Actions — your IDE does not need to be open; it opens a draft PR when done
  • Without copilot-setup-steps.yml, the agent runs in a bare environment and cannot run tests requiring installed dependencies
  • You can follow up with @copilot in PR review comments — the agent addresses feedback on the existing branch rather than opening a new PR