Add configurable worktree branch prefix to CLI (parity with Desktop)

Resolved 💬 5 comments Opened Feb 26, 2026 by tigeryst Closed Mar 27, 2026

Feature Request

Claude Code Desktop allows users to configure a branch prefix that gets prepended to every worktree branch name (Settings → "Worktree location"). This is useful for organizing Claude-created branches by user or team.

The CLI has no equivalent setting — worktrees always use worktree-<name>.

Desired Behavior

A settings.json option (e.g. worktreeBranchPrefix) that lets CLI users configure a prefix:

{
  "worktreeBranchPrefix": "claude/"
}

So claude --worktree fix-auth would create a branch named claude/fix-auth instead of worktree-fix-auth.

Motivation

  • Desktop/CLI parity: Desktop already supports this; CLI users should have it too
  • Branch organization: Teams with naming conventions (e.g. user/branch, claude/branch) benefit from prefixing
  • Related: #28761 requests removing the hardcoded worktree- prefix — a configurable prefix would address that use case as well

View original on GitHub ↗

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