[BUG] Claude Code creates undocumented `.claire/` directory when using worktrees

Resolved 💬 2 comments Opened Mar 8, 2026 by kenwang-coursera Closed Mar 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the isolation: "worktree" Agent parameter (i.e. the --worktree flag), Claude Code creates an undocumented .claire/ directory in the repository root. This directory appears as an untracked file in git status, has no mention in official docs or changelogs, and is not included in any .gitignore templates.

Directory structure created:

.claire/
  worktrees/
    <random-name>/
      <worktree-name>/

What Should Happen?

Either this directory should not be created, or it should live under .claude/ (consistent with all other Claude Code local state), or it should be documented and included in default .gitignore templates.

Error Messages/Logs

No error — the directory is silently created.

Steps to Reproduce

  1. Open Claude Code in any git repository
  2. Use the Agent tool with isolation: "worktree" (or trigger any worktree-based workflow)
  3. After the session, run git status
  4. Observe .claire/ listed as an untracked directory

Claude Model

Sonnet (default)

Is this a regression?

I don't know (previously observed .claude/ being used for similar state)

Claude Code Version

2.1.71 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Others have observed this as well: https://x.com/jasoncrawford/status/2029209599727874557

Workaround: add .claire/ to your .gitignore.

View original on GitHub ↗

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