[DOCS] Session management missing automatic PR linking documentation
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/how-claude-code-works
https://code.claude.com/docs/en/common-workflows
Section/Topic
Session management sections in how-claude-code-works.md and common-workflows.md
Current Documentation
The session management documentation explains how to resume sessions by ID or name, fork sessions, and use the session picker. It also mentions the PR status indicator in the footer:
When working on a branch with an open pull request, Claude Code displays a clickable PR link in the footer
However, there is no mention of automatic PR-session linking.
What's Wrong or Missing?
Changelog v2.1.27 added automatic PR linking: sessions are now automatically linked to PRs when created via gh pr create. This feature enables the --from-pr flag workflow and creates a connection between Claude Code sessions and GitHub pull requests.
Users have no documentation explaining:
- That sessions get automatically linked to PRs when using
gh pr create - How this linking works
- How to use linked sessions (via
--from-pr)
Suggested Improvement
Add a new subsection to "Resume or fork sessions" in how-claude-code-works.md or common-workflows.md:
### PR-linked sessions
When you create a pull request using `gh pr create` during a Claude Code session, the session is automatically linked to that PR. This enables PR-centric workflows:
* **Resume by PR**: Use `claude --from-pr 123` or `claude --from-pr https://github.com/org/repo/pull/123` to resume the session where you created the PR
* **Track context**: The link helps you return to the exact conversation where you developed and submitted the changes
This automatic linking happens transparently when Claude Code detects a PR creation. No additional configuration is required.
Impact
Medium - Makes feature difficult to understand
Additional Context
Source: Changelog v2.1.27
Exact changelog entry:
Automatic PR linking: Sessions are now automatically linked to PRs when created via gh pr create
This feature works in conjunction with the --from-pr flag (also added in v2.1.27).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗