claude-code - 💡(How to fix) Fix [Bug] Markdown links render as full URLs instead of labels on Windows Git Bash [1 comments, 2 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#54826Fetched 2026-04-30 06:34:52
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"ZB7: Diagnostics file path mismatch: expected C:\Users\hroma\.claude\projects\C--Users-hroma-luther-pro\memory\feedback_file_links.md, got file://c:\users\hroma\.claude\projects\c--users-hroma-luther-pro\memory\feedback_file_links.md/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:53:38.100Z"},{"error":"ZB7: Diagnostics file path mismatch: expected C:\Users\hroma\.claude\projects\C--Users-hroma-luther-pro\memory\MEMORY.md, got file://c:\users\hroma\.claude\projects\c--users-hroma-luther-pro\memory\memory.md/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:53:44.822Z"},{"error":"ZB7: Diagnostics file path mismatch: expected C:\Users\hroma\.claude\projects\C--Users-hroma-luther-pro\memory\feedback_file_links.md, got file://c:\users\hroma\.claude\projects\c--users-hroma-luther-pro\memory\feedback_file_links.md/)\n at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:59:06.387Z"},{"error":"Error: ENOENT: no such file or directory, unlink 'C:\Users\hroma\AppData\Local\Temp\claude\C--Users-hroma-luther-pro\fd82ca5c-6cdd-45ae-8f49-36378f501113\tasks\a7f50827cdfb02647.output'\n at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8754:299)","timestamp":"2026-04-29T22:10:38.814Z"},{"error":"MaxFileReadTokenExceededError: File content (31569 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n at Su7 (B:/~BUN/root/src/entrypoints/cli.js:4908:12810)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:10:44.819Z"},{"error":"AxiosError: Request failed with status code 404\n at hn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12716)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:11:02.790Z"}]

Code Example

[{"error":"ZB7: Diagnostics file path mismatch: expected C:\\Users\\hroma\\.claude\\projects\\C--Users-hroma-luther-pro\\memory\\feedback_file_links.md, got file://c:\\users\\hroma\\.claude\\projects\\c--users-hroma-luther-pro\\memory\\feedback_file_links.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:53:38.100Z"},{"error":"ZB7: Diagnostics file path mismatch: expected C:\\Users\\hroma\\.claude\\projects\\C--Users-hroma-luther-pro\\memory\\MEMORY.md, got file://c:\\users\\hroma\\.claude\\projects\\c--users-hroma-luther-pro\\memory\\memory.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:53:44.822Z"},{"error":"ZB7: Diagnostics file path mismatch: expected C:\\Users\\hroma\\.claude\\projects\\C--Users-hroma-luther-pro\\memory\\feedback_file_links.md, got file://c:\\users\\hroma\\.claude\\projects\\c--users-hroma-luther-pro\\memory\\feedback_file_links.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:59:06.387Z"},{"error":"Error: ENOENT: no such file or directory, unlink 'C:\\Users\\hroma\\AppData\\Local\\Temp\\claude\\C--Users-hroma-luther-pro\\fd82ca5c-6cdd-45ae-8f49-36378f501113\\tasks\\a7f50827cdfb02647.output'\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8754:299)","timestamp":"2026-04-29T22:10:38.814Z"},{"error":"MaxFileReadTokenExceededError: File content (31569 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Su7 (B:/~BUN/root/src/entrypoints/cli.js:4908:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:10:44.819Z"},{"error":"AxiosError: Request failed with status code 404\n    at hn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12716)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:11:02.790Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description

  • Windows 11 + Git Bash + mintty
    • TERM=xterm-256color
    • 2.1.123 (Claude Code)
    • „Markdown links render as full URLs instead of labels — label-only OSC 8 hyperlinks work on macOS"

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.123
  • Feedback ID: 5ef8a386-1896-4f96-8d8c-adb10e160096

Errors

[{"error":"ZB7: Diagnostics file path mismatch: expected C:\\Users\\hroma\\.claude\\projects\\C--Users-hroma-luther-pro\\memory\\feedback_file_links.md, got file://c:\\users\\hroma\\.claude\\projects\\c--users-hroma-luther-pro\\memory\\feedback_file_links.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:53:38.100Z"},{"error":"ZB7: Diagnostics file path mismatch: expected C:\\Users\\hroma\\.claude\\projects\\C--Users-hroma-luther-pro\\memory\\MEMORY.md, got file://c:\\users\\hroma\\.claude\\projects\\c--users-hroma-luther-pro\\memory\\memory.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:53:44.822Z"},{"error":"ZB7: Diagnostics file path mismatch: expected C:\\Users\\hroma\\.claude\\projects\\C--Users-hroma-luther-pro\\memory\\feedback_file_links.md, got file://c:\\users\\hroma\\.claude\\projects\\c--users-hroma-luther-pro\\memory\\feedback_file_links.md/)\n    at beforeFileEdited (B:/~BUN/root/src/entrypoints/cli.js:4948:25234)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T21:59:06.387Z"},{"error":"Error: ENOENT: no such file or directory, unlink 'C:\\Users\\hroma\\AppData\\Local\\Temp\\claude\\C--Users-hroma-luther-pro\\fd82ca5c-6cdd-45ae-8f49-36378f501113\\tasks\\a7f50827cdfb02647.output'\n    at async <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:8754:299)","timestamp":"2026-04-29T22:10:38.814Z"},{"error":"MaxFileReadTokenExceededError: File content (31569 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Su7 (B:/~BUN/root/src/entrypoints/cli.js:4908:12810)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:10:44.819Z"},{"error":"AxiosError: Request failed with status code 404\n    at hn (B:/~BUN/root/src/entrypoints/cli.js:115:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:120:12716)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:122:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:11:02.790Z"}]

extent analysis

TL;DR

The issue with Markdown links rendering as full URLs instead of labels on Windows 11 with Git Bash and mintty may be related to the TERM environment variable or file path mismatches.

Guidance

  • Verify that the TERM environment variable is set correctly to xterm-256color and that the terminal supports this setting.
  • Check for file path mismatches in the error logs, specifically the Diagnostics file path mismatch errors, and ensure that the file paths are correctly formatted.
  • Consider using the file:// protocol consistently in file paths to avoid mismatches.
  • Review the MaxFileReadTokenExceededError and adjust the file reading parameters to read specific portions of the file instead of the whole file.

Example

No code snippet is provided as the issue seems to be related to environment variables and file paths rather than code.

Notes

The issue may be specific to the Windows 11 environment and the combination of Git Bash and mintty. The error logs suggest that there are file path mismatches and issues with reading file contents.

Recommendation

Apply a workaround by consistently using the file:// protocol in file paths and adjusting the file reading parameters to avoid exceeding the maximum allowed tokens.

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

claude-code - 💡(How to fix) Fix [Bug] Markdown links render as full URLs instead of labels on Windows Git Bash [1 comments, 2 participants]