Bug: `claude -w <worktree>` hangs on startup in v2.1.81, UI never renders

Resolved 💬 6 comments Opened Mar 23, 2026 by orozCoding Closed May 25, 2026

Summary

claude -w <worktree-name> freezes on startup in v2.1.81 — the interactive UI never renders. The process starts and establishes TCP connections, then hangs indefinitely. Running claude directly inside the worktree directory works fine. Downgrading to v2.1.80 resolves the issue immediately.

Environment

  • OS: macOS 25.0.0 (Darwin)
  • Claude Code version: 2.1.81 (regression), 2.1.80 (working)
  • Shell: zsh
  • Setup: git repo with multiple worktrees managed under .claude/worktrees/

Steps to Reproduce

  1. Have an existing worktree previously created with -w (e.g. claude -w my-feature-branch)
  2. From the main repo root, run: claude -w my-feature-branch
  3. Observe: process starts, no UI renders, hangs forever

Expected Behavior

The Claude Code interactive UI loads normally, as it does in v2.1.80.

Actual Behavior

The process enters a sleeping state (S+) with two ESTABLISHED TCP connections — one to the Anthropic API (160.79.104.10:443) and one to a Google Cloud endpoint (137.66.149.34.bc.googleusercontent.com:443). The working directory never changes to the worktree path (confirmed via lsof — CWD stays as the main repo root). The UI never renders.

Diagnostic Details

  • lsof confirms the process CWD never switches from the main repo to the worktree — the freeze happens before the worktree switch
  • Both TCP connections are fully ESTABLISHED (not a connectivity/DNS issue)
  • Worktree git state is clean, no lock files present
  • Disabling all plugins (ruby-lsp, frontend-design) does not fix it
  • Removing the global MCP server config does not fix it
  • Running claude directly inside the worktree directory works fine
  • Affects all worktrees, not one specific branch
  • Rolling back the symlink to v2.1.80 fixes it immediately

Workaround

# Instead of:
claude -w my-worktree-name

# Navigate to the worktree directly:
cd .claude/worktrees/my-worktree-name && claude

Or downgrade:

ln -sf ~/.local/share/claude/versions/2.1.80 ~/.local/bin/claude

View original on GitHub ↗

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