TUI auto-links bare #NNN issue/PR refs to the current repo, ignoring an explicitly-named different repo

Resolved 💬 3 comments Opened May 20, 2026 by nathanjohnpayne Closed May 24, 2026

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.:

| Consumer | PR | State |
|---|---|---|
| repoB | #90 | merged |
| repoC | #65 | merged |

  1. 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗