[Bug] Insights command path building fails on Windows with incorrect variable concatenation

Resolved 💬 3 comments Opened Apr 5, 2026 by andmigque Closed Apr 9, 2026

Bug Description

Insights command path building is wrong

When running the below slash insights command in Claude Code I receive the subsequent error:
/insights
Error: EEXIST: file already exists, mkdir 'C:\Users\myuser.claude\usage-data\session-meta'

Explanation

The bug is a string concatenation issue. Claude makes this mistake often with powershell
# Broken Code

"$HOME.claude"
# Correct code

"$($HOME)\.claude"

# Or better
Join-Path -Path "$HOME" -ChildPath ".claude"

Versions

Windows 11
Powershell 7.5.4
2.1.92 (Claude Code)

Notes

This a regression. I can confirm this feature was working in 2.1.86 (Claude Code)
This issue is pervasive. I have seen it other places in Claude Code on Windows.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.92
  • Feedback ID: 348d7aa6-d783-43bf-9292-d3edd1f3608f

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗