claude-code - 💡(How to fix) Fix TUI auto-links bare #NNN issue/PR refs to the current repo, ignoring an explicitly-named different repo

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…
RAW_BUFFERClick to expand / collapse

Bug

In the Claude Code TUI, bare GitHub #NNN issue/PR references in assistant output are auto-linkified to the current working repo — even when the surrounding text (e.g., the same table row or sentence) explicitly names a different repository. The resulting link points at the wrong repo and silently lands on an unrelated item.

Repro

  1. Run Claude Code with cwd in repo owner/repoA.

  2. Have the assistant render a table (or prose) that references PRs/issues in other repos using bare #NNN, e.g.:

    ConsumerPRState
    repoB#90merged
    repoC#65merged
  3. Click the #90 link.

Expected

The link should resolve to the repo named in context (owner/repoB#90), or bare #NNN should not be auto-linkified at all when the row/sentence names a different repo (require explicit owner/repo#NNN to link).

Actual

#NNN always links to the cwd repo: https://github.com/owner/repoA/issues/90. So a row clearly about repoB #90 links to repoA's #90 — frequently an unrelated/closed item.

Concrete instance from a real session (cwd = nathanjohnpayne/mergepath): the assistant printed a table of propagation PRs across 8 other repos. The row device-platform-reporting #90 — MERGED rendered #90 as a link to https://github.com/nathanjohnpayne/mergepath/issues/90 (an unrelated, long-closed issue in the cwd repo) instead of nathanjohnpayne/device-platform-reporting#90. This caused real confusion — the reader believed a different PR had been closed.

Impact

  • Misleading navigation in any multi-repo workflow (cross-repo propagation, fan-out PRs, "repo of repos"): every cross-repo #NNN link is wrong.
  • The failure is silent — the link looks valid and resolves to a real (wrong) item, so it's easy to act on the wrong information.

Suggested fix

Scope auto-linkification of bare #NNN to the cwd repo only when no other repo is named in the immediate context; otherwise either link to the named repo or render #NNN as plain text. Safest: only auto-link fully-qualified owner/repo#NNN.

Environment

  • Claude Code 2.1.114 (CLI), macOS

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