From GitHub Issue to Pull Request: Letting an Agent Do the Work
Write a clear issue, assign it to an agent, get a pull request back for review. The whole workflow hinges on one thing: how good the issue actually is.
The workflow, in short
You write an issue describing a bug or feature. Instead of picking it up yourself, you assign it to a coding agent - GitHub's own Copilot coding agent, or Claude Code / Codex wired into your repo's CI. The agent works on a branch, opens a pull request when done, and you review it like a human contributor's.
Why the issue is the real prompt
An agent working from an issue has no context beyond what's written plus whatever it discovers in the repo. A vague issue ("fix the login bug") gets a vague attempt. A good one includes what's wrong, how to reproduce it, and acceptance criteria - what "done" looks like, concretely.
The agent works on a branch
The agent doesn't touch main directly. It creates its own branch and commits there - the same shape as a human contributor's workflow, automated end to end from issue to open PR.
The PR description matters as much as the code
A well-behaved agent generates a PR description summarizing what changed and why, linking the issue and noting what it tested - often the fastest way to judge if it understood the task, before you open the diff.
Human review is the gate
The agent opening a PR doesn't mean the work is done - it means it's ready for review. Treat it like a new team member's PR: read the diff, check it against acceptance criteria, don't merge just because it compiles.
EXAMPLE
Issue #482: Export button silently fails on large reports Problem: Clicking "Export CSV" on reports over 10k rows does nothing - no error, no download. Steps to reproduce: Open any report with 10k+ rows, click Export CSV. Acceptance criteria: - Reports over 10k rows export successfully as CSV - If export fails for any reason, the user sees an error message instead of silence - Add a test covering the 10k+ row case -> assigned to Copilot coding agent -> agent opens PR #491 "Fix silent CSV export failure on large reports" with a description linking issue #482 and noting the added test.
๐ ๏ธ EXERCISE โ TRY IT YOURSELF
Rewrite a vague issue into one that's actually usable for an agent, and if possible, hand it off.
- Find (or write) a vague issue, like "the search page is slow" or "fix the export bug".
- Rewrite it to include: a clear problem statement, reproduction steps, and 2-3 explicit acceptance criteria.
- If you have access to a coding agent wired into a repo (GitHub Copilot coding agent, or Claude Code in CI), assign the rewritten issue to it.
- If you don't have that access, hand the rewritten issue to a CLI agent locally and ask it to work only from the issue text, on a branch.
- Review the resulting PR or diff against your acceptance criteria before considering it done.
โ SELF-CHECK
- โ Does your rewritten issue include acceptance criteria specific enough that you and the agent would agree on what 'done' means?
- โ Did the agent's PR or diff satisfy every acceptance criterion you listed, or did you find a gap during review?
QUICK QUIZ
What's the most common reason an agent's first pull request from an assigned issue misses the mark?
SOURCES
- Claude Code Docs: GitHub Actions โ code.claude.com
- GitHub Docs: About GitHub Copilot Cloud Agent โ docs.github.com
- GitHub Docs: About Pull Request Reviews โ docs.github.com