.claude/commands/ files deleted within seconds of session start (v2.1.81)

Resolved 💬 4 comments Opened Mar 24, 2026 by abecutter Closed Apr 23, 2026

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

  1. Verify files exist: ls .claude/commands/ | wc -l → 76
  2. Launch claude in the project directory
  3. Skills appear briefly in the session
  4. Within seconds, skills disappear
  5. 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.

View original on GitHub ↗

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