[BUG] /insights report path missing backslash before .claude on Windows — markdown escape strips \.
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?
Description
When running /insights in Claude Code CLI on Windows, the report path is displayed with a missing backslash before .claude:
Displayed: C:\Users\tomge.claude\usage-data\report.html
Expected: C:\Users\tomge\.claude\usage-data\report.html
The \. sequence is being interpreted as a markdown escape, stripping the backslash from the rendered output.
Steps to Reproduce
- Open Claude Code CLI on Windows
- Run
/insights - Observe the file path in the output — the
\before.claudeis missing
Expected Behavior
The full path should render with the backslash intact: C:\Users\<username>\.claude\usage-data\report.html
Environment
- OS: Windows 11 (10.0.26200)
- Terminal: Git Bash
- Claude Code: Latest (as of 2026-04-02)
Root Cause
The markdown renderer treats \. as an escape sequence and strips the backslash. Windows file paths containing \.claude are affected because the dot after the backslash triggers this behavior.
Related Issues
- #18996 — EDITOR env var strips backslash before
.claudefolder (same symptom, different trigger) - #12677 — Markdown renderer interprets
_,*,\as tokens in non-markdown content
Suggested Fix
Escape backslashes in file paths before passing them to the markdown renderer and / or wrap file paths in inline code blocks (backticks) which preserve literal characters and / or correct the concatenation of the userprofile variable with the report path.
What Should Happen?
Claude CLI should be amended to correctly reflect the path of the report
Error Messages/Logs
N/A
Steps to Reproduce
/insights in Claude CLI
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.89 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗