brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: claude --from-pr 123 reopens the session that opened a pull request

Claude
~/tips/tip-claude-code-from-pr

claude --from-pr 123

Opens the Claude Code sessions that are linked to a specific pull request.

A reviewer comment can arrive days after the pull request went up, when I have forgotten which session did the work. Claude Code can find it from the pull request number.

When Claude creates a pull request, Claude Code links the session to it automatically. --from-pr uses that link:

claude --from-pr 123

It opens the session picker filtered to the sessions linked to that pull request. Pick one and you are back in that conversation with its context. The flag accepts a PR number, a GitHub or GitHub Enterprise PR URL, a GitLab merge request URL or a Bitbucket pull request URL:

claude --from-pr https://github.com/example/repo/pull/123

So you can paste the link from the review mail and skip the lookup. Once you are in, the follow-up is an ordinary prompt, for instance asking to address the comment on line 40.

The link is only made when Claude created the pull request in that session. If you opened the PR yourself, or in another tool, the picker may have nothing to show. You can still find the older conversation with claude --resume, which resumes a session by ID or name or shows a picker.

Further reading: Claude Code CLI reference

Going deeper: Moving on from hdtv: how to export your TV show list to Trakt.tv

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link