[FEATURE] `owner/repo#number` PR shorthand should link to configured GitHub Enterprise host
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When Claude Code references a pull request using the owner/repo#number shorthand, the markdown link behind it always points to https://github.com/owner/repo/pull/number — even when the repository's git remote points to a GitHub Enterprise instance.
Proposed Solution
The hyperlink should resolve against the actual remote host detected from the git config, so that [owner/repo#123](https://ghes.example.com/owner/repo/pull/123) is generated instead of targeting github.com.
Alternative Solutions
- Ask Claude to always include the full URL in PR links — this works but requires a one-time instruction per session or a persistent memory entry, and shouldn't be necessary
- Manually replace
github.comwith the GHES host in the generated link each time - Configure a
CLAUDE.mdnote reminding Claude to use the full URL — again, a workaround rather than a fix
A cleaner alternative solution (if inferring from the remote feels too implicit) would be to allow users to configure a githubHost setting in Claude Code's settings, which would be used as the base for all PR link generation.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Multiple enterprise teams use GitHub Enterprise Server (GHES) and rarely push to github.com. The short owner/repo#number format is convenient and readable, but the broken link forces users to either navigate manually or ask Claude to spell out the full URL every time.
Claude Code already has access to the git remote URL (e.g. via git remote get-url origin). It could use that to infer the base host when formatting PR links, falling back to github.com when no remote is configured or when the remote is already github.com.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗