DOCS / PULL REQUESTS
Create a pull request
Create PR lives one click from the workspace you just reviewed. The dialog arrives pre-filled — Birch chains the agent’s own session title, the source task’s title, and your branch’s commits into a sensible title and bullet description — and the ✨ button can ask your agent CLI for a better title, on your subscription, never automatically.
Where Create PR lives
Section titled “Where Create PR lives”- Workspace properties panel — the Create PR button in the actions row. While a live (open or draft) PR already exists for the workspace’s branch, the button gives way to one that opens that PR in your browser instead.
- The workspace Git tab — a Create PR button in the tab’s header, with the same swap to an open-PR chip once a PR exists.
- The command line —
birch pr create, with--title,--body,--base, and--draftflags. It uses the same prefill logic as the dialog. See the CLI reference.
The dialog
Section titled “The dialog”| Field | Behavior |
|---|---|
| Branches | The head branch (your workspace’s branch) is read-only; the base branch next to it is an editable field, prefilled with the workspace’s base branch. |
| Title | Prefilled by the chain below, with the ✨ generate button overlaid at its right edge. |
| Description | Prefilled with the branch’s commits as a bullet list; optional. |
| Create as draft | Opens the PR as a draft on the provider. |
Create PR submits; Cancel discards everything.
How the prefill is chosen
Section titled “How the prefill is chosen”The Title is the first of these that produces something usable:
- The agent’s own session title — for a Claude workspace, exactly the label its AI tab carries. Read from the agent’s transcript, so it works even for a workspace whose terminal closed days ago.
- The source task’s title — when the workspace was launched from an inbox Task.
- The branch’s oldest own commit — the first thing committed on the branch names the work; the newest is routinely “fix tests”.
- A humanized branch name —
feature/add-widgetbecomes “Add widget”. A branch whose last segment is id-shaped (Birch’s own workspace branches look likebirch/terminal/0317168d) yields nothing rather than a meaningless title. - Otherwise the Title starts empty.
Titles are collapsed to a single line and capped at 80 characters (counted as displayed characters, so non-ASCII titles are never cut mid-glyph).
The Description is the branch’s own commits — git log --first-parent --no-merges base..HEAD — as a bullet list under a ## Changes heading. Merging the base branch into your workspace doesn’t flood the list, and a commit whose subject is identical to the Title is dropped so a single-commit branch doesn’t repeat itself.
✨ Generate a title with your agent
Section titled “✨ Generate a title with your agent”The ✨ button beside Title runs your agent CLI — the claude or codex binary already installed on your machine — not Birch’s Anthropic API features. The point is to spend what you already pay for: your subscription’s usage limits, or that CLI’s own key.
- Birch prefers the workspace’s own agent, then falls back to
claude, thencodex. The button only appears when one of them is installed. - Generation is never automatic. The first click shows a cost dialog — “Generate a title with Claude?” (or Codex) — explaining that this is a real request against your usage limits, with a Don’t ask again checkbox. Silencing it is remembered per user.
- While generating, the ✨ glyph becomes
…. The run is capped at 120 seconds. - Declining the warning, or an answer the agent couldn’t produce, never clears a Title you already have.
The agent sees your branch names, the commit bullet list, and up to 24,000 characters of the workspace diff. Claude runs in one-shot print mode (-p --output-format text); Codex runs codex exec --ephemeral in a read-only sandbox, so the throwaway run can neither edit files nor hijack your workspace’s resume session.
Uncommitted work is committed for you
Section titled “Uncommitted work is committed for you”A PR must include your local work, so if the worktree is dirty when you press Create PR:
- Birch shows a confirmation listing every changed file (including how many are untracked).
- On confirm, it commits everything (
git add -A) in one commit whose message is the dialog’s Title (with the Description as the commit body, if you wrote one). - It then publishes the branch to the remote (workspace branches are created locally and never pushed until now), or pushes any pending commits.
- Finally it creates the PR.
Unresolved merge conflicts block the whole flow — you’ll see “Resolve the merge conflicts in this worktree before creating a PR.”
Task status on PR created
Section titled “Task status on PR created”After a successful create, Birch opens the new PR in your browser. If the workspace was launched from a tracker Task, it also offers to move that task’s status — the “Update task status?” prompt with a Change status / Skip choice and a Remember and don’t ask again checkbox.
The behavior is configurable per tracker account in Settings → Tasks: Ask each time, Change automatically (offered once a status has been remembered — applies the remembered status silently and shows a toast), or Never offer.
After creation: the PR chip
Section titled “After creation: the PR chip”The workspace properties panel gains a PULL REQUEST card: state pill, a CI-checks chip (click it to open the PR page), the target branch, and an open-in-browser button.
The chip stays fresh without you asking:
- It refreshes every time you enter the workspace, and after every successful push from the Git tab (throttled to one provider call per branch per ~30 seconds).
- A failed or offline refresh is a no-op — the chip is never blanked because the network flaked. Genuinely merged or closed PRs are picked up by the refresh itself or by the repository-wide sync that runs about every 10 minutes.
From here, working the PR — comments, checks, merging — is covered in Review & manage PRs, and AI review of the PR in AI code review.