[BUG] `claude --worktree` hangs forever for a worktree with a bare repository

Resolved 💬 4 comments Opened Feb 21, 2026 by zzJinux Closed Apr 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude --worktree hangs forever in a worktree with a bare repository.
It does execute normally in a worktree with a non-bare repository.

What Should Happen?

As the help says:

Create a new git worktree for this session (optionally specify a name)

Error Messages/Logs

_Nothing_

Steps to Reproduce

  1. Unzip bare-wt-setup.zip
  2. cd to worktree-a
  3. Execute claude --worktree

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.50

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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