# Claude Code pull requests that merge themselves

> Land a coding agent's branch as a GitHub pull request with auto-merge on, so it merges once your checks pass. When to use that and when Finish is enough.

Source: https://shuriken.sh/blog/pull-requests-auto-merge

Land a coding agent's branch as a GitHub pull request with auto-merge on, so it merges once your checks pass. When to use that and when Finish is enough.

[Update](https://shuriken.sh/blog) By Shuriken Updated 10 November 2026 3 min read

**Contents**

A Shuriken chat can work on its own branch. When its work is done, you can land it two ways: press Finish to check, rebase and squash-merge it locally, or open a GitHub pull request from the chat and turn on auto-merge, so GitHub merges it once your required checks and reviews pass. This post is about the second way, and how to pick between them.

## Why we built it #

Finish was built for the solo case: you, a repository, five agents and no ceremony. One click, and the work is in main. We wrote about it in [Finish: checks, rebase and merge in one click](https://shuriken.sh/blog/finish-one-click-merge).

Then we kept hearing about repositories where that doesn't fly: a protected main where nothing goes in without CI, or a teammate who reviews every change, agent or not. For those, a local merge is the wrong ending. The right ending is a pull request that waits for CI and the reviewer, then merges without anyone coming back to press a button.

## How it works #

Open a chat that works on its own branch. The git menu at the top of the chat (it's in ⌘K too) does the rest:

- Create PR. Before anything leaves your computer, Shuriken scans what the branch adds for things that look like secrets. If it finds one, it stops, pushes nothing and shows you the file. Otherwise it pushes the chat's branch and opens a pull request on GitHub.
- Auto merge. With the pull request open, the same menu offers Auto merge as squash, merge or rebase. Pick one, and GitHub merges the pull request on its own once its required reviews and status checks pass ([GitHub Docs](https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/automatically-merging-a-pull-request), read 22 October 2026).
- Keep an eye on it from the chat. A Pull request tab shows its checks, reviews and approvals, and View PR opens it on GitHub.
- Tidy up. Once it's merged, archive the chat. Its worktree goes with it.

You need GitHub connected in Shuriken. If it isn't, Create PR is greyed out and says why instead of failing quietly.

### Why Auto merge sometimes isn't there #

GitHub only offers auto-merge in two conditions. The repository must allow it (Settings › General › Allow auto-merge), and the pull request must be one that can't merge yet, usually because branch protection still wants a review or a passing check. If the pull request could merge right now, Shuriken offers Merge PR instead. A draft or a pull request with conflicts gets neither until that's sorted, and if your repository uses a merge queue, Shuriken says so and leaves the merging to GitHub.

In Shuriken a chat can work on its own branch in its own worktree, and Finish merges it after your checks.

[Try Shuriken](https://shuriken.sh/)

## Which checks run where #

The two routes check different things.

- Finish runs the commands you list under checks in shuriken.json, on your computer, after rebasing. A red check goes back to the chat's agent to fix, up to three times.
- A pull request is judged by your repository's CI on GitHub. shuriken.json isn't involved: auto-merge waits for the checks GitHub requires.

If you use both routes, put the same commands in both places. For example:

json
{
"checks": ["npm run typecheck", "npm test"]
}

and the same two steps in your CI workflow. Then a chat that passes locally won't surprise you on GitHub.

## Finish or pull request? #

| | Finish | Pull request with auto-merge |
| --- | --- | --- |
| Where it merges | Your project folder, locally | On GitHub |
| What decides | shuriken.json checks | Your CI and branch protection |
| Who fixes a red check | The chat's agent, up to three tries | You, or a chat you start on its branch |
| Reviews | None | Whatever your repository requires |
| Best for | Solo projects, quick changes | Teams, protected main , CI you trust |

Our own rule of thumb: if anyone else will read the code, open a pull request. If it's just you and the tests are local, Finish is faster.

Chats on their own branch [each work in their own worktree](https://shuriken.sh/features/parallel-agents), so several pull requests can be in flight at once without stepping on each other. More on running many at a time in [How to run Claude Code agents in parallel](https://shuriken.sh/guides/run-claude-code-agents-in-parallel).

Want to try it on your own repository? [Try Shuriken](https://shuriken.sh/), start a chat on its own branch, and press Create PR in its git menu when the agent is done.

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fpull-requests-auto-merge&text=Claude%20Code%20pull%20requests%20that%20merge%20themselves)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fpull-requests-auto-merge)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fblog%2Fpull-requests-auto-merge&t=Claude%20Code%20pull%20requests%20that%20merge%20themselves)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fblog%2Fpull-requests-auto-merge&title=Claude%20Code%20pull%20requests%20that%20merge%20themselves)[E-mail](mailto:?subject=Claude%20Code%20pull%20requests%20that%20merge%20themselves&body=https%3A%2F%2Fshuriken.sh%2Fblog%2Fpull-requests-auto-merge)

## Frequently asked questions

**Can Shuriken open a pull request for a Claude Code chat?**

Yes. A chat on its own branch has a git menu at the top of the chat. Create PR scans the branch for anything that looks like a secret, pushes it and opens the pull request on GitHub.

**How do I make the pull request merge itself?**

Once the pull request is open, choose Auto merge (squash, merge or rebase) from the same button. GitHub merges it when the required reviews and checks pass. Your repository has to allow auto-merge.

**Why don't I see Auto merge?**

GitHub offers auto-merge only when the repository allows it and the pull request can't merge yet, for example because required checks are still running. If it can merge now, Shuriken offers Merge PR instead. Drafts, pull requests with conflicts and repositories with a merge queue don't get it either.

**Should I use Finish or a pull request?**

Finish merges locally in one click after your shuriken.json checks pass, which suits solo projects. A pull request suits repositories with CI, reviewers or a protected main branch.

Parallel agents

Agents side by side, each on its own branch if you want.

A new chat gets its own branch and worktree unless you pick the project folder, so agents don't step on each other. Finish runs your checks and merges each one back.

[Try Shuriken](https://shuriken.sh/)

[How it works](https://shuriken.sh/features/parallel-agents)

## Keep reading

- [How to review AI-generated code without reading every line: Story 27 Oct 2026 5 min read We review agent diffs tests first: would each test fail without the change? Then deletions, the diff's edges, secrets, and a run. Our real misses.](https://shuriken.sh/blog/review-ai-generated-code)
- [Fork a chat from any reply, then merge it back: Update 27 Oct 2026 4 min read Try another approach without losing the first: fork a Shuriken chat from any reply, keep the fork under its parent, then merge its work back in.](https://shuriken.sh/blog/fork-and-merge-into)
- [Many dev servers, many worktrees, no port fights: Story 8 Nov 2026 5 min read Parallel Claude Code worktrees all want port 3000. How Shuriken finds dev servers, hands each worktree its own port, and tips that work without it.](https://shuriken.sh/blog/worktree-port-conflicts)
- [How Shuriken started: a tool we built for ourselves: Story 27 Oct 2026 4 min read We build software for clients and ourselves. No harness fit how heavily we use AI, so we built our own. Then a programmer asked: why don't we sell this?](https://shuriken.sh/blog/how-shuriken-started)
- [A git workflow for Claude Code that keeps main clean: Story 27 Oct 2026 4 min read The Claude Code git workflow we'd give anyone running several agents: a branch per task, small commits, read the diff, checks before merge, then squash.](https://shuriken.sh/blog/claude-code-git-workflow)
- [Best tools for parallel coding agents (2026): Comparison 27 Oct 2026 7 min read Conductor, Paradev, Orca, Emdash, Claude Squad, the Codex app and Shuriken compared: isolation, agents, platforms, price and what happens at your limit.](https://shuriken.sh/compare/best-parallel-coding-agent-tools)
- [Codex worktrees: run several Codex agents in parallel: Guide 27 Oct 2026 7 min read Codex app: pick Worktree under the composer. Codex CLI: run codex --worktree (0.156.0 or later). Each such chat gets its own checkout.](https://shuriken.sh/guides/codex-worktrees-parallel-agents)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
