# Hand off your coding agent's pull request for review, test and merge

> Hand the pull request you wrote with your coding agent to SHIP in one command. Its agents fix failing CI, review the diff and test it, ready for you to merge.

Available now, for developers.

Finish the change with your coding agent and open the pull request. One command hands it to SHIP, which reviews it, tests it and sends it back ready for you to merge.

- **For:** Developers who write code with a coding agent in their editor or terminal.
- **Instead of:** Babysitting your own pull request through CI, review and testing.

Run it on the branch of the pull request you opened, with the GitHub CLI installed or --pr. No ticket needed: the mission takes the pull request's title.

```
ship delegate pr
```

## Finish the work, then let go of it

1. **Write the change with your own agent.** Work in your editor or terminal with the coding agent you already use. Nothing about how you write code changes.
2. **Open the pull request, then delegate it.** Run ship delegate pr on the branch, or ask your agent to. With the GitHub CLI installed it finds the pull request from the branch; otherwise pass --pr.
3. **Merge what comes back.** Your CI runs, the Reviewer reads the diff, and the Tester tests the change on a preview your own pipeline deploys. The pull request comes back with the verdicts and the proof attached.

## Steer one mission without touching the project

- **Pin a harness and model for one review.** Pass --harness or --model to run this mission's Reviewer, or its Tester with --at qa, on a different agent or model, without changing your ship.yml.
- **Add a security pass for this branch only.** Pass --prompt-file to give the Reviewer extra instructions for this mission only, such as a security pass, and add --prompt-mode extend to keep your repository's own review conventions.
- **Delegate before CI is green.** If CI is failing when you hand the pull request over, the agents fix that first, then review and test the change.
- **Answer the Reviewer from your terminal.** Send your answer with ship instruct, and the Builder picks the open pull request back up with it in hand.
- **Run it from CI or a script.** Every command takes --json, and a token bound to one project carries only the scopes the script needs.

## Frequently asked questions

### Do I need a tracker or a ticket?

No: ship delegate pr creates the mission from the pull request and takes its title. In a project with no tracker the mission lives in the console, and in a project with Linear or GitHub Issues SHIP files the issue for you. [Ways of working](https://letsship.ai/docs/getting-started/ways-of-working#agent-to-pr)

### Can my coding agent run the hand-off itself?

Yes: tell your coding agent set up https://letsship.ai/SKILL.md once, and it installs the CLI and learns when to run ship delegate pr. You create the API token it asks for, because an agent cannot mint its own. [Coding agents](https://letsship.ai/docs/cli/coding-agents)

### Does SHIP push to my branch or open pull requests for me?

For a branch you hand over, you open the pull request and SHIP opens no second one. When CI, the review or the test finds something to fix, the Builder pushes the fix to that same branch.

### What does a mission cost?

A mission uses one SHIP credit for up to 3 agent-hours, and one more for each further 3 agent-hours or part of them. Your own provider bills model usage at your own rates.

### Do I need a preview environment?

No. When ship.yml declares a preview, your own pipeline deploys it and the Tester tests the change there; without one, the deploy is skipped and the Tester exercises the change in its sandbox. [Deployments](https://letsship.ai/docs/configuration/deployments)

### Can SHIP only test a pull request that is already reviewed?

Yes: ship delegate pr --at qa sends a pull request that is already reviewed straight to the Tester. Pass --model or --harness with it to pick what the Tester runs on.

## Get your next pull request reviewed and tested

Connect your repository, install the CLI, and run ship delegate pr on the branch you are on.

Source: https://letsship.ai/platform/agent-to-pr
