Skip to content
BENIBIX Learn

--from-pr Flag

Also known as claude --from-pr, --from-pr

It lists the sessions that worked on one pull request.

Think of it like

It is like you find all the notes with the same star on them.

Example

A reviewer asks Jack why a change was made. He runs claude --from-pr 418, opens the session that wrote it, and asks Claude to explain its choice.

Why it matters

The chat behind a pull request often says best why the code looks the way it does.

Definition

--from-pr shows the list of sessions that worked on one pull request. Give it the pull request's number or its link. It takes links from GitHub, GitLab and Bitbucket. When Claude opens a pull request, the session is linked to it by itself, so this finds the session that wrote the code.

Example code

bash
claude --from-pr 123
List the sessions linked to pull request 123.
--from-pr narrows the list to one pull request.

Common mistake

Expecting it to find a pull request you opened by hand. Only sessions where Claude made the pull request are linked.

Key takeaways

  1. 1
    Number or link. GitHub, GitLab, Bitbucket.
  2. 2
    Linked by itself. When Claude opens it.
  3. 3
    A short list. Just that pull request.

Learn it properly