---
title: "Pull requests"
description: "Open draft pull requests, fix failing CI checks, respond to review threads, manage stacked PRs, and control merge and Git attribution settings."
url: "https://www.thecompany.company/docs/code/pull-requests"
---

# Pull requests

> Open draft pull requests, fix failing CI checks, respond to review threads, manage stacked PRs, and control merge and Git attribution settings.

Agents can open pull requests, run verification checks, and push follow-up fixes to the same branch. Keep follow-ups in the same [session](/docs/agent/sessions) so the agent stays on the right branch, worktree, and pull request.

![A pull request's status: ready to merge, approved, and all checks passing](https://www.thecompany.company/docs/screenshots/light/pr-page.webp)

The top of a pull request shows whether it can merge, who reviewed it, and how its checks went.

## Open a 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.

> In the API repository, add a regression test for an empty search result and fix the response if the test fails. Run the targeted test and open a draft PR. Don't merge.

## Fix failing CI and respond to reviews [#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.

> Check why the latest Linux job failed on this PR. Fix it if our branch caused the failure, push the fix, and reply to the review thread with what changed. Leave the thread open if you can't verify it.

## Stacked pull requests [#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 [#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). |

## Next steps [#next-steps]

- [Code review](https://www.thecompany.company/docs/code/code-review.md): Enable automated GitHub reviews and custom Guardian charters.
- [Repositories](https://www.thecompany.company/docs/code/repositories.md): Sync repositories and manage Git attribution.
- [GitHub](https://www.thecompany.company/docs/integrations/github.md): Mention @co on GitHub PRs, issues, and review threads.
- [Computer](https://www.thecompany.company/docs/agent/computer.md): Isolate parallel branches with Git worktrees.
