[Bug] Session transcripts stored with file path instead of session ID on POSIX systems with symlinks
Bug Description
Claude Code has a problem with the way it stores sessions transcripts on POSIX file systems (e.g. MacOS, Unix, Linux, etc). If I create a symbolic link e.g. ~/website -> /var/www/html then depending where I run claude from the session transcript will either be stored in .claude/-website or in .claude/-var-www-html | This is REALLY bad if a user is constantly switching between directories, sometimes using symbolic links, and sometimes not. It means inconsistency in being able to resume previous sessions. The session ids are all that are needed. Why does it inject the file path as a reference? It's totally unneccesary and leads to massive issues with automations using symbolic links if a user who created a session didn't or vice versa.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.170
- Feedback ID: 50eead2a-1ff4-4d1d-b049-f57602ad52fb
Errors
[]