[FEATURE] Drop worktree- prefix for branches created by "claude -w" or make it configurable

Open 💬 2 comments Opened Jun 11, 2026 by alexkli

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Running claude -w <name> will create a git worktree at .claude/worktrees/<name> and a branch named worktree-<name>.

That prefix worktree- in a branch name is not the best fit since it's usually irrelevant for a branch name that it was created inside a worktree. Also it makes it much longer and might not be aligned with team's branch naming conventions.

IMO a user should be able to specify the name directly as they wish, without having to rename the branch every time they created a worktree.

The current only half stable workaround is to create both a WorktreeCreate and WorktreeRemove hook that replicate the worktree creation logic from claude -w but change the naming of the branch that gets created. Remove is needed because if there is a custom WorktreeCreate hook, claude will skip it's default remove logic as well. This ends up being quite a heavy solution for a simple naming prefix issue.

Proposed Solution

  1. Drop the hardcoded worktree- branch name prefix. Direct control over the name seems sensible. Shouldn't impact folks since it only applies to new claude sessions.
  2. Make that prefix (or naming pattern) configurable in claude's settings.json for anyone who prefers a separate naming scheme.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

Example scenario:

  1. I want to work on feature auth
  2. I run claude -w auth to create a separate worktree
  3. I would love to have the branch be named auth as well

Additional Context

_No response_

View original on GitHub ↗

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