[BUG] Claude Desktop auto-links bare `#NNNN` issue refs to CWD `origin` remote — wrong repo for fork-and-PR workflows
When Claude Desktop's Code tab renders an assistant message containing a bare #NNNN GitHub issue/PR reference, the resulting clickable link resolves against the current working directory's origin remote. For the standard fork-and-PR contributor workflow, where origin is the user's fork and upstream is the canonical repo, every such link 404s.
This appears to be a new bug surface for a previously reported class of problem. The same auto-link-to-CWD-origin behavior has been reported repeatedly in the TUI (#27894 closed stale, #28005 closed as dup, #31450 closed invalid, related TUI-OSC8 variant #29188 closed stale), and per #29188 the bug does not occur in the VS Code extension's webview ("renders the correct URL, confirming the bug is specific to the TUI markdown renderer"). The Claude Desktop renderer is a third surface where the same bug is present, and to my knowledge it has not been reported before. I checked all open area:desktop issues for link/url/repo/autolink terms before filing.
The framing the prior TUI reports missed: they described this as a cross-repo discussion problem ("I'm in repo A, Claude mentions repo B"). The more common and impactful case is the fork-and-PR contributor workflow on a single project:
- I work on
stdlib-js/stdlib(upstream). - My
originremote is my fork (batpigandme/stdlib) because that is the only remote I have push access to. This is the standardgh repo fork --remoteconfiguration. - When Claude renders a bare
#9459in a Desktop response, Desktop links it tobatpigandme/stdlib/issues/9459, which 404s because the issues live upstream atstdlib-js/stdlib.
So this is not an edge case for users discussing unrelated repos. It is the default state for anyone contributing to a project they do not own, which is most OSS contributors most of the time.
Repro
- Clone an OSS repo, add
upstreampointing at the canonical repo. - Push your fork as
origin(standardgh repo fork --remoteflow). - In Claude Desktop's Code tab, ask about an issue in the upstream repo by number.
- Click the rendered link in the response. Goes to
<your-fork>/issues/N. 404.
Workaround
Write full URLs [#9459](https://github.com/stdlib-js/stdlib/issues/9459) for every reference. Reliably correct, but loses the auto-link convenience and is verbose. I am doing this in my notes now.
Suggested fix, in order of effort
- Document the current resolution logic. I checked
settings.mdand confirmed there is no documented mechanism. Even just publishing the rule (presumably "usesoriginremote") would help users diagnose 404s instead of assuming the link is broken. - Add a
settings.jsonfield, e.g.,github.issuesRepo: "stdlib-js/stdlib", to override the inferred repo per project. - Auto-detect. If an
upstreamremote exists, prefer it for issue resolution while continuing to useoriginfor push/branch context. Recognizes that "where do I push code" and "where do issues live" can have different correct answers in this workflow. This matchesgh's own behavior:gh issue viewcorrectly handles upstream by default when run inside a fork.
Option 3 is the cleanest fix for OSS contributors. Option 2 is the lowest-risk shipping path. Option 1 is the floor — please do at least this much.
Given that this is the third independent renderer to exhibit the same bug class, the fix probably belongs in a shared component rather than per-renderer.
Environment
Claude Desktop on macOS, Code tab. Repro tested against stdlib-js/stdlib upstream / batpigandme/stdlib fork.
Happy to test or share more context.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗