[FEATURE] Configurable worktree branch prefix in CLI (Desktop parity)
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
Re-filing #28945, which was auto-closed as stale on 2026-03-27 without being resolved.
The Claude Code Desktop app has a configurable worktree branch prefix setting (in the Settings UI), but the CLI has no equivalent. The CLI hardcodes the worktree- prefix on all worktree branch names:
claude --worktree feature-auth
# Creates branch: worktree-feature-auth
Teams with branch naming conventions (e.g. claude/feature-auth, user/feature-auth) cannot use the CLI's worktree support without manual branch renaming after the fact.
Proposed Solution
A worktreeBranchPrefix setting in settings.json:
{
"worktreeBranchPrefix": "claude/"
}
So claude --worktree feature-auth would create branch claude/feature-auth instead of worktree-feature-auth.
Setting it to "" would produce just feature-auth with no prefix.
Alternative Solutions
- #31969 (request #2) proposes a
branchparameter onEnterWorktreeto specify the exact branch name. A configurable prefix complements that approach — the prefix handles the common case (consistent naming convention) while an exact branch name parameter handles one-off overrides. - #28761 requested removing the
worktree-prefix entirely. A configurable prefix addresses this by setting it to"".
Priority
Low - Nice to have
Feature Category
Configuration and settings
Use Case Example
Our team uses claude/ as a branch prefix for all Claude-generated branches. With worktreeBranchPrefix: "claude/", worktree branches would follow the same convention automatically instead of using the hardcoded worktree- prefix.
Additional Context
- #28945 — original issue with prior discussion and community support (closed as stale, not as resolved or duplicate)
- The Desktop app already supports this setting, so the implementation likely exists server-side or in shared code — this is about exposing it in the CLI's
settings.json
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗