[BUG] Desktop app (Code tab, Windows) – Markdown file viewer ignores link position in preview mode
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude providing md links in the responses, that points to a specific section of the document file, but Markdown file viewer ignores link position in preview mode, it always navigates to the very beginning of the document.
Use case: the assistant cites specific sections of long design documents; I want to read the cited section rendered, not in raw markdown.
What Should Happen?
Expected:
- Switching source → preview keeps the scroll position (sync to the current line).
- #fragment links scroll the preview to the matching heading.
Error Messages/Logs
No error message, links just does not scroll the preview to the matching heading
Steps to Reproduce
Steps:
- In a Code session, click a markdown link in the assistant's reply pointing to a .md file with a line suffix, e.g. [x](doc.md:237).
→ The Files pane opens the file in source view, scrolled to line 237 (correct).
- Click the eye icon to switch to the rendered (preview) view.
→ The preview opens at the top of the document; the position is lost.
- Click a link with a heading fragment instead, e.g. [x](doc.md#42-some-heading).
→ The file opens directly in preview mode, but at the top; the fragment is ignored.
Tested with GitHub-style slugs, slugs keeping the dot (4.2-...), and text-only slugs (ASCII-only heading) – none scroll.
Claude Model
_No response_
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude 2.19675.1 (861368) 2026-10-05T16:14:31.000Z
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_