--worktree --tmux skips WorktreeCreate/WorktreeRemove hooks
Resolved 💬 1 comment Opened Mar 26, 2026 by mikelnrd Closed Mar 27, 2026
Description
claude --worktree correctly fires WorktreeCreate hooks, but claude --worktree --tmux bypasses the hooks entirely and creates a git worktree directly at .claude/worktrees/<name>.
Steps to Reproduce
- Register
WorktreeCreateandWorktreeRemovehooks in.claude/settings.json - Run
claude --worktree— hook fires, custom worktree creation works - Run
claude --worktree --tmux— hook does NOT fire, git worktree created at.claude/worktrees/
Expected Behavior
--tmux should still fire WorktreeCreate/WorktreeRemove hooks, using the hook's stdout as the worktree path. The --tmux flag should only control how the session is displayed (in a tmux pane), not change the worktree creation mechanism.
Actual Behavior
--tmux uses a separate codepath that creates git worktrees directly, bypassing hooks. This breaks custom VCS backends (e.g., jujutsu workspaces) that rely on the hooks.
Environment
- Claude Code v2.1.81
- Linux (Pop!_OS)
- jj-colocated repo (has both
.jj/and.git/)
Workaround
Use --worktree without --tmux and manage the terminal pane separately.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗