[BUG] /insights output renders \.claude path incorrectly on Windows due to markdown escape

Resolved 💬 1 comment Opened Jun 11, 2026 by DaniGuima Closed Jun 11, 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 /insights skill outputs the report file path as plain markdown text. On Windows, the backslash before .claude in the path (\.claude) gets interpreted as a markdown escape sequence, causing \. to render as . — so the backslash is silently dropped and the displayed path is wrong.

Displayed output:
file://C:\Users\daniel.guimaraes.claude\usage-data\report-2026-06-11-104752.html

Actual path on disk (not possible to see with Markdown visualization even here):
C:\Users\daniel.guimaraes\.claude\usage-data\report-2026-06-11-104752.html

What Should Happen?

The full correct path should be displayed, including the backslash before .claude. File paths in the /insights output should be wrapped in backticks so markdown does not interpret \. as an escape sequence.

Error Messages/Logs

No error — the path is silently rendered incorrectly in the UI output.

Steps to Reproduce

  1. Run /insights in Claude Code on Windows
  2. Observe the file path printed at the top of the output
  3. Note that the \ before .claude is missing in the displayed path

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.173 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

The fix would be to wrap file paths in backticks in the /insights skill output message. This prevents markdown from treating backslashes as escape characters.

Related: the same stripping of \ before .claude on Windows has been noted in other contexts (e.g., issue #18996).

View original on GitHub ↗

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