Pull requests
Agents can open pull requests, run verification checks, and push follow-up fixes to the same branch. Keep follow-ups in the same session so the agent stays on the right branch, worktree, and pull request.
Open a pull request
Name the repository, the intended change, and the test or check that proves it works. Ask for a draft pull request when you want to inspect the diff before requesting review, and explicitly state don't merge when you want to make the final merge call yourself.
Fix failing CI and respond to reviews
Open the pull request view to inspect the diff, check statuses, and review comments:
- Fix with agent: In Checks, open a failing job and select Fix with agent (where offered) to send that failure directly to an agent instead of copying logs manually.
- Auto-fix on GitHub: When a pull request carries a control comment on GitHub, Auto-fix routes follow-up fixes to that session.
- Targeted follow-ups: Specify which checks to watch, which failures to fix, and when to stop. After pushing a verified fix, confirm CI ran on the new head before resolving threads, and leave any thread open if the fix could not be verified.
Stacked pull requests
Use a stack when a pull request builds on top of another unmerged pull request. Review shared changes starting from the bottom PR in the stack. When base branches change, use Rebase stack to update the stack as a unit, then inspect the resulting diffs and checks before merging.
Merge and attribution
| Goal | Where to check |
|---|---|
| Merge a PR | Review the latest head diff and confirm GitHub's required checks, approvals, and branch protection rules pass. |
| Confirm merge vs. auto-merge | Verify whether the PR is actually merged or only has GitHub auto-merge armed. |
| Choose PR author | Settings → Preferences → Git → Pull request attribution (You via linked GitHub account, or The agent). |
| Choose commit author | Settings → Preferences → Git → Commit attribution (configured separately from PR attribution). |