claude-code - 💡(How to fix) Fix [Bug] /insights command displays incorrect file path on Windows (missing backslash between username and .claude) [1 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#46041Fetched 2026-04-11 06:30:31
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Code Example

[]
RAW_BUFFERClick to expand / collapse
<img width="1003" height="261" alt="Image" src="https://github.com/user-attachments/assets/d9f3433e-3ffb-4e71-8ce7-887bdf8168ac" />

Bug Description When using /insights, output was written to appropriate path "C:/Users/mohan/.claude/usage-data/report.html", but in the details shown as reponse, the path mentioned was "C:/Users/mohan.claude/usage-data/report.html" which was non existent. After the currently logged in user name, "" was missed. The environment is Windows 11, Claude code terminal. Fix has to be applied on the message being displayed and nothing to be changed for the actual file writing method as the file is actually written.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.89
  • Feedback ID: 212e31b5-e657-43f4-8226-0b1b67f06e47

Errors

[]

extent analysis

TL;DR

The issue can be fixed by modifying the code to correctly display the file path in the response, including the backslash after the username.

Guidance

  • Verify that the file is being written to the correct path (C:/Users/mohan/.claude/usage-data/report.html) and that the only issue is with the displayed path.
  • Check the code that generates the response message for the /insights endpoint to ensure that it is correctly constructing the file path, including the backslash after the username.
  • Update the code to use the correct path when displaying the file location in the response.
  • Test the updated code to ensure that the correct file path is displayed in the response.

Example

No code example is provided as the issue does not include the relevant code snippet.

Notes

The fix should only be applied to the code that generates the response message and should not affect the actual file writing method.

Recommendation

Apply a workaround to update the code that generates the response message to correctly display the file path, including the backslash after the username, as this is a specific issue with the displayed path and not a version-related problem.

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