[BUG] User-input markdown autolinker treats `.md`/`.rs` filename extensions as TLDs, mangles `<word>_<filename>.md` references in chat

Resolved 💬 1 comment Opened Apr 25, 2026 by BSmith1012 Closed May 29, 2026

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?

The chat input rendering pipeline auto-converts filenames containing underscores followed by TLD-matching extensions into broken markdown links.

For example, typing CODE_STANDARDS.md in a chat message renders as CODE_[STANDARDS.md](http://STANDARDS.md) — everything after the underscore gets wrapped as a markdown link with http://STANDARDS.md as the URL. The .md extension is being interpreted as Moldova's country-code TLD.

This affects any filename matching the pattern <word>_<filename>.<TLD-matching-ext>. Common file extensions in software projects that match valid TLDs and trigger this bug: .md, .rs, .io, .ai, .app, .dev, .co. The leading <word>_ portion is left outside the broken link, and the rendered link tries to navigate to a non-existent hostname.

What Should Happen?

The text CODE_STANDARDS.md should render verbatim as CODE_STANDARDS.md — no link wrapping, no URL transformation, no autolinking.

File extensions like .md and .rs are common in software projects (Markdown documentation, Rust source files) and should not be interpreted as URL hostnames just because they happen to also be valid TLDs.

Error Messages/Logs

No error messages. This is a silent rendering issue — no exception, no warning. The session debug log (with `/debug` enabled) does not capture it because it's a UI/rendering concern rather than a backend event.

The bug is observable purely by visual inspection of rendered chat messages in the conversation transcript.

Steps to Reproduce

  1. Open Claude Code.
  2. In chat input, type a message containing a filename matching <word>_<filename>.md — for example, CODE_STANDARDS.md.
  3. Send the message.
  4. Observe the rendered message in the conversation transcript: it appears as CODE_[STANDARDS.md](http://STANDARDS.md) instead of the verbatim filename.

Comparison test (confirms TLD-aware behavior):

  1. In the same chat, type README_NOTES.txt and send.
  2. Observe: this renders correctly as README_NOTES.txt with no autolinking, because .txt is not a TLD.

The contrast between steps 4 and 6 confirms the autolinker is matching against a TLD list rather than treating dot-extensions generically.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.117

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

I'm submitting this bug with the help of Claude AI, though I do wish that once the AI realized this was a bug that it could have sent the bug report in for me. Also, many of the slash commands it and the "Get Help" AI were telling me to use were not available (/bug, /version, /doctor) which was frustrating.

Environment:

  • OS: Windows 11 (Build 10.0.26100.8246)
  • Claude Code version: 2.1.119
  • Surface: Claude Desktop App
  • Node version: v24.13.0

Workaround:
Wrapping filenames in backticks suppresses the autolinker — ` CODE_STANDARDS.md ` renders correctly. This is the only workaround found.

Settings checked (none control this behavior):

  • User: ~/.claude/settings.json
  • Project: <project>/.claude/settings.json
  • Local: <project>/.claude/settings.local.json

None contain any rendering / markdown / autolink configuration. There is no settings key to disable this behavior.

Affected file extensions in software projects:

  • .md (Moldova ccTLD) — confirmed broken
  • .rs (Serbia ccTLD) — likely affects Rust source filenames like Cargo.rs, build.rs
  • .io, .ai, .app, .dev, .co — likely affected (gTLDs and ccTLDs commonly used in software)

Project impact:
In a project with documentation files like CODE_STANDARDS.md, DATA_MODEL.md, DESIGN_SYSTEM.md, ROADMAP.md, and Rust source files like Cargo.rs / build.rs, every chat message that references any of these by name gets mangled. The user has to remember to wrap each filename in backticks, and forgetting (which is easy in conversational chat) produces broken renders that look like real markdown links and may even be clickable to nowhere.

Naturally-occurring evidence:
The user's prior messages in many Claude Code chats show this bug occurring inline in real conversations — examples are easy to capture as screenshots from any active session for visual proof.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗