Don't Open Claude Code With a Non-Latin Directory Name. Your Conversations Are Disappearing.
Don't Open Claude Code With a Non-Latin Directory Name. Your Conversations Are Disappearing. Confirmed across 4 languages. 6 layers of impact. One root cause. A conversation vanished June 24. I had a 3
Don't Open Claude Code With a Non-Latin Directory Name. Your Conversations Are Disappearing.
Confirmed across 4 languages. 6 layers of impact. One root cause.
A conversation vanished
June 24. I had a 30-minute session with Claude Code in C:\Users\...\Desktop\claude้ข่ฏ. Went back in the afternoon. Gone. --resume found nothing.
I didn't delete it. I didn't run cleanup. I didn't touch .claude.
Digging into the encoding
Claude Code stores all conversation history under .claude/projects/ โ one directory per project. The directory name encodes the project path.
็ฎๅ/ โ C--Users-...-Desktop---
claude้ข่ฏ/ โ C--Users-...-Desktop-claude--
ๆต่ฏไธญๆ็ฎๅฝ/ โ C--Users-...-Desktop-------
The Chinese characters are gone. Replaced by hyphens. Two Chinese characters become two hyphens. Six characters become six hyphens.
To verify, I created two different directories with the same character count:
้กน็ฎ็ฒ (3 chars) โ C--Users-...-Desktop----
ๆต่ฏไน (3 chars) โ C--Users-...-Desktop---- โ Same directory
Two different folders โ mapped to the same session directory.
This means three things
1. Cleanup in one directory deletes the other
Running claude project purge in ้กน็ฎ็ฒ deleted the project directory ---- โ including all sessions from ๆต่ฏไน. The user of ๆต่ฏไน never knew their conversations were deleted.
2. One directory can see the other's conversations
Running claude --resume in ๆต่ฏไน showed ้กน็ฎ็ฒ's conversation. Someone who has never opened that project can resume its full chat history.
3. Not just Chinese
I tested Japanese (ๆฅๆฌ่ชใในใ), Korean (ํ๊ตญ์ดํ
์คํธ), and Arabic (ุงุฎุชุจุงุฑ). All four languages produced the same collision. Every non-Latin script is affected.
Pre-existing collisions on real systems
While investigating, I found that my own .claude/projects/ already contained 5 hyphen-only directories with sessions from real folders โ not test directories. For example, C--Users-...-Desktop-------- contained sessions from C:\Users\...\Desktop\่ตๆ. This bug has been silently colliding sessions for as long as these directories have existed.
The root cause
Claude Code's path encoding strips every non-Latin character and replaces it with a hyphen. Different directory names with the same non-Latin character count collide to the same .claude/projects/ entry.
Real path: C:\Users\...\Desktop\ๆต่ฏไธญๆ็ฎๅฝ
Encoded path: C--Users-...-Desktop-------
All 6 characters โ 6 hyphens
Who is affected
Anyone using directory names with Chinese, Japanese, Korean, Arabic, Russian, Hebrew, Thai โ or any non-Latin script. That's every developer who doesn't name their folders in ASCII.
At risk:
- Running
claude project purgein one project silently deleting another project's conversations - Using
--resumeand seeing conversations from unrelated projects -
autoUploadSessionssyncing merged conversations from multiple projects to claude.ai -
cleanupPeriodDays(default 30 days) operating on the collided directory โ treating multiple projects as one
Detection tool โ ai-config-guard
I built a free, open-source scanner that catches this before Claude Code silently loses your data. Point it at any project directory:
git clone https://github.com/yurenpai/ai-config-guard.git
cd ai-config-guard
node index.js .
It does three things:
Checks the directory name FIRST โ if it contains non-Latin characters, you get an immediate warning with the encoded name and collision risk. This is the
NON_LATIN_DIRNAMErule โ built from the discovery above.Scans your project files โ detects instructions that could make an AI coding assistant read your credentials, exfiltrate data, or execute hidden commands. 7 detection rules covering everything from
CREDENTIAL_READto cross-language ambiguity.Runs in CI/CD โ GitHub Actions integration with SARIF export for GitHub Code Scanning.
Web dashboard included. Dark/light theme. Chinese/English bilingual. Zero dependencies beyond Node.js.
This is the only tool that currently detects the non-Latin path encoding bug. If your directory name has Chinese, Japanese, Korean, Arabic, or any non-Latin characters โ it will tell you before Claude Code loses your conversations.
June 25, 2026 ยท Discovered, tested, reported, and built a detection tool for it.
GitHub Issue: https://github.com/anthropics/claude-code/issues/70674
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.