.claude/commands/ files deleted within seconds of session start (v2.1.81)
Description
Files in .claude/commands/ are deleted within seconds of a Claude Code session starting. The files exist on disk before launch, are briefly visible in the session (slash commands appear momentarily), then vanish. After deletion, /skills shows no user commands.
Environment
- Claude Code v2.1.81
- Windows 11 (MSYS2/Git Bash)
- 76 .md files in .claude/commands/
Reproduction
- Verify files exist:
ls .claude/commands/ | wc -l→ 76 - Launch
claudein the project directory - Skills appear briefly in the session
- Within seconds, skills disappear
- From another terminal:
ls .claude/commands/ | wc -l→ 0
Files persist indefinitely when Claude is not running. Deletion only occurs during active sessions.
Hooks disabled
Both PreToolUse hooks were disabled (replaced with no-op echo commands in global settings) — files still vanish. This rules out hook scripts as the cause.
Related
- #34330:
.claude/skills/deletion bug (v2.1.76+) — same behavior but for skills directory - Our files are in
.claude/commands/not.claude/skills/, but the behavior is identical
Impact
This affects a shared skills library that serves 20+ projects via symlink junctions. When the source files vanish, every project loses all slash commands and hooks simultaneously.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗