claude-code - 💡(How to fix) Fix [BUG] Claude Desktop auto-links bare `#NNNN` issue refs to CWD `origin` remote — wrong repo for fork-and-PR workflows [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56033Fetched 2026-05-05 05:59:54
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Root Cause

  • I work on stdlib-js/stdlib (upstream).
  • My origin remote is my fork (batpigandme/stdlib) because that is the only remote I have push access to. This is the standard gh repo fork --remote configuration.
  • When Claude renders a bare #9459 in a Desktop response, Desktop links it to batpigandme/stdlib/issues/9459, which 404s because the issues live upstream at stdlib-js/stdlib.

Fix Action

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.

RAW_BUFFERClick to expand / collapse

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 origin remote is my fork (batpigandme/stdlib) because that is the only remote I have push access to. This is the standard gh repo fork --remote configuration.
  • When Claude renders a bare #9459 in a Desktop response, Desktop links it to batpigandme/stdlib/issues/9459, which 404s because the issues live upstream at stdlib-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

  1. Clone an OSS repo, add upstream pointing at the canonical repo.
  2. Push your fork as origin (standard gh repo fork --remote flow).
  3. In Claude Desktop's Code tab, ask about an issue in the upstream repo by number.
  4. 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

  1. Document the current resolution logic. I checked settings.md and confirmed there is no documented mechanism. Even just publishing the rule (presumably "uses origin remote") would help users diagnose 404s instead of assuming the link is broken.
  2. Add a settings.json field, e.g., github.issuesRepo: "stdlib-js/stdlib", to override the inferred repo per project.
  3. Auto-detect. If an upstream remote exists, prefer it for issue resolution while continuing to use origin for push/branch context. Recognizes that "where do I push code" and "where do issues live" can have different correct answers in this workflow. This matches gh's own behavior: gh issue view correctly 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.

extent analysis

TL;DR

The most likely fix is to add a settings.json field to override the inferred repo per project or auto-detect the upstream remote for issue resolution.

Guidance

  • The issue is caused by the Claude Desktop renderer using the origin remote for resolving issue links, which is not the intended behavior for fork-and-PR contributor workflows.
  • To verify the issue, follow the repro steps provided, which involve cloning an OSS repo, adding an upstream remote, and asking about an issue in the upstream repo by number in the Claude Desktop Code tab.
  • A temporary workaround is to write full URLs for every reference, such as [#9459](https://github.com/stdlib-js/stdlib/issues/9459), although this loses the auto-link convenience.
  • To mitigate the issue, consider documenting the current resolution logic or adding a settings.json field to override the inferred repo per project.

Example

No code snippet is provided as the issue is related to the Claude Desktop renderer's behavior and not a specific code implementation.

Notes

The fix likely belongs in a shared component rather than per-renderer, given that this is the third independent renderer to exhibit the same bug class.

Recommendation

Apply workaround by adding a settings.json field, such as github.issuesRepo: "stdlib-js/stdlib", to override the inferred repo per project, as this is the lowest-risk shipping path.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING