[BUG] Claude Code stores session data in folders named after your working directory path (with special characters replaced by dashes)

Resolved 💬 3 comments Opened Feb 4, 2026 by CobusBeukes Closed Feb 8, 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?

What's happening:

  • Claude Code stores session data in folders named after your working directory path (with special characters replaced

by dashes)

  • The correct location is ~/.claude/projects/D--OneDrive---Comp-Name-Office-Comp-Name-Claude-Projects/
  • Due to a bug (likely related to the spaces and dashes in your path), it's creating the folder inside your working

directory instead

What Should Happen?

What's happening:

  • Claude Code stores session data in folders named after your working directory path (with special characters replaced

by dashes)

  • The correct location is ~/.claude/projects/D--OneDrive---Comp-Name-Office-Comp-Name-Claude-Projects/
  • Due to a bug (likely related to the spaces and dashes in your path), it's creating the folder inside your working

directory instead

Error Messages/Logs

D--OneDrive---Comp-Name-Office-Comp-Name-Claude-Projects folder is recreated all the time

Steps to Reproduce

Confirmed - this is a Claude Code bug, not something I'm intentionally creating.

What's happening:

  • Claude Code stores session data in folders named after your working directory path (with special characters replaced

by dashes)

  • The correct location is ~/.claude/projects/D--OneDrive---Insight-Systems-Office-Insight-Systems-Claude-Projects/
  • Due to a bug (likely related to the spaces and dashes in your path), it's creating the folder inside your working

directory instead

The folder will likely reappear because the current session is actively using it for storage.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.31

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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