[Bug] Conversation history and files lost after restart due to Unicode normalization issue in project path

Status Open
Reported on v2.1.177
Maintainer reply None cached
Activity 0 comments · opened Aug 19, 2026

Bug Description
Recent conversation history is lost after restarting Claude Code. Version: 2.1.177 (has also occurred on earlier versions) Platform: macOS 26.5.2 (25F84), launched from terminal SYMPTOM After restarting Claude Code, the most recent portion of the conversation is gone from the UI. This is recurring, not a one-off. The loss is not limited to the UI: - Claude itself has no record of the missing turns. Asked about them in the continued session, it cannot see them. - Searching the system does not turn them up either. The content is not recoverable from anywhere on disk. - Files that were created during that stretch are sometimes gone as well - subagent reports and .md files that had been written are simply not there. In one instance roughly two hours of work disappeared this way, including subagent output. At the time I assumed a machine reboot might have discarded something, but it happened again on a plain restart of Claude Code with no reboot involved. POSSIBLY RELATED: project slug is not Unicode-normalized My project path contains Japanese characters (/Users/<user>/Desktop/1_ポートフォリオ/my_project). The project directory name under ~/.claude/projects/ appears to be derived from the cwd string without Unicode normalization. macOS returns NFD from the filesystem, and "1_ポートフォリオ" is 9 code points in NFC but 10 in NFD, because the handakuten of ポ decomposes: python3 -c "import unicodedata as u; s='1_ポートフォリオ'; print([len(u.normalize(f,s)) for f in ('NFC','NFD')])" # -> [9, 10] As a result two directories exist for the same cwd, differing by exactly one character, and the same session ids appear in both: ~/.claude/projects/-Users-<user>-Desktop-1---------my-project (295 files) ~/.claude/projects/-Users-<user>-Desktop-1----------my-project (62 files) A session written under one slug and looked up under the other would appear to be missing. I do not know whether this explains the loss described above - I only know the split exists on my machine. EXPECTED - Normalize the cwd (e.g. to NFC) before computing the project directory name, and merge directories that have already been split. A fallback that locates sessions by id rather than only by slug would help here. - Conversation turns, and files written during them, should be durably persisted before a restart can drop them. History that exists should never become unreachable from the UI or from --resume. IMPACT For long technical sessions this is severe. Hours of discussion and generated work vanish with no warning and no recovery path, and there is no way to tell it has happened until the missing content is needed.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.177
  • Feedback ID: 4fb3f319-a16a-430f-8055-053aa2521ce9

Errors

[]

View original on GitHub ↗