[BUG] Agent still misspells .claude -> .claire creating stray dir on v2.1.169 (recurrence of #31493 / #31984)

Open 💬 0 comments Opened Jun 9, 2026 by amalzulkipli

Filing per the lock-bot guidance on #31984 ("please file a new issue and reference this one"). This is a still-reproducing recurrence of #31493 and #31984 (both closed + locked, March 2026, reported on v2.1.71). It is not fixed on the current v2.1.169.

What happened

During an Agent worktree-isolation session, a subagent's Write tool wrote to:

.claire/worktrees/<branch>/tests/unit/<file>.py

instead of:

.claude/worktrees/<branch>/tests/unit/<file>.py

The misspelled .claude -> .claire path silently created the entire .claire/ directory tree, because Write auto-creates parent directories. The session even noticed ?? .claire/ in git status, talked itself out of it ("could be a cosmetic typo"), and moved on without cleaning up.

Downstream harm (not purely cosmetic)

Because .claire/ is not in any default .gitignore, the stray directory sat untracked for ~3 weeks. It was then nearly committed when a later git add -A swept it into staging alongside real work. So this can leak a junk directory into commits, not just clutter git status.

Steps to reproduce

  1. Run an Agent / subagent flow with isolation: "worktree" (or any worktree-based workflow).
  2. After the session, run git status.
  3. Observe .claire/ listed as untracked, containing files that were meant to land under .claude/.

Suggested fixes

  • Normalize/validate the .claude literal in the worktree + Write path handling so the .claire misspelling can't reach the filesystem.
  • And/or add .claire/ to the default ignore set and emit a warning when it is created.

Environment

  • Claude Code 2.1.169
  • macOS
  • Anthropic API

References: #31493, #31984, #38589

View original on GitHub ↗