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.

AUTO-MERGE beside a real screenshot of chats in Shuriken's sidebar, two on their own branches, under "Pull requests that merge once checks pass"
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.

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:

  1. 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.
  2. 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, read 22 October 2026).
  3. 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.
  4. 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.

Finish, on your computer: commit and rebase, run the shuriken.json checks, let the agent fix failures up to three times, squash-merge, and the chat closes. Pull request with auto-merge, on GitHub: secret scan, push and open the pull request, turn on auto merge, wait for CI and reviews, and GitHub merges it. FinishOn your computer, one clickCommit and rebaseshuriken.json checksAgent fixes, 3 triesSquash-mergeChat closesPull request with auto-mergeOn GitHub, from the chat's git menuSecret scanPush, open PRAuto merge onCI and reviewsGitHub merges

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.

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, 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.

Want to try it on your own repository? Try Shuriken, start a chat on its own branch, and press Create PR in its git menu when the agent is done.

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.

Free tools