Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/settings
Section/Topic
"Worktree settings" section (lines 256–265)
Current Documentation
The "Worktree settings" section documents only two keys:
| Key |
Description |
Example |
worktree.symlinkDirectories |
Directories to symlink from the main repository into each worktree to avoid duplicating large directories on disk. No directories are symlinked by default |
["node_modules", ".cache"] |
worktree.sparsePaths |
Directories to check out in each worktree via git sparse-checkout (cone mode). Only the listed paths are written to disk, which is faster in large monorepos |
["packages/my-app", "shared/utils"] |
No setting for controlling the base branch is documented.
What's Wrong or Missing?
As of v2.1.133, Claude Code introduces a worktree.baseRef setting with two valid values:
worktree.baseRef: "fresh" (default) — --worktree, EnterWorktree, and agent-isolation worktrees branch from origin/<default> (the remote default branch)
worktree.baseRef: "head" — worktrees branch from local HEAD instead
The v2.1.133 changelog notes that EnterWorktree's default base was changed back to origin/<default> (it had been local HEAD since v2.1.128), and that users who want to preserve unpushed commits in new worktrees should set worktree.baseRef: "head". This behavior change is not documented in the Worktree settings section or in the worktrees page.
Suggested Improvement
Add worktree.baseRef to the Worktree settings table:
| `worktree.baseRef` | Which ref to branch from when creating a new worktree via `--worktree`, `EnterWorktree`, or agent `isolation: "worktree"`. `"fresh"` branches from `origin/<default>` (the remote default branch); `"head"` branches from local `HEAD`. Defaults to `"fresh"`. | `"fresh"` |
Also update the "Choose the base branch" section in the worktrees page to note that worktree.baseRef controls this behavior and defaults to origin/<default>.
Impact
Medium - Makes feature difficult to understand
Additional Context
Changelog entry (v2.1.133):
Added worktree.baseRef setting (fresh | head) to choose whether --worktree, EnterWorktree, and agent-isolation worktrees branch from origin/<default> or local HEAD. Note: the default fresh changes EnterWorktree's base back to origin/<default> (it has been local HEAD since 2.1.128) — set worktree.baseRef: "head" to keep unpushed commits in new worktrees
Affected Pages:
Total scope: 2 pages affected
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/settings
Section/Topic
"Worktree settings" section (lines 256–265)
Current Documentation
The "Worktree settings" section documents only two keys:
worktree.symlinkDirectories["node_modules", ".cache"]worktree.sparsePaths["packages/my-app", "shared/utils"]No setting for controlling the base branch is documented.
What's Wrong or Missing?
As of v2.1.133, Claude Code introduces a
worktree.baseRefsetting with two valid values:worktree.baseRef: "fresh"(default) —--worktree,EnterWorktree, and agent-isolation worktrees branch fromorigin/<default>(the remote default branch)worktree.baseRef: "head"— worktrees branch from localHEADinsteadThe v2.1.133 changelog notes that
EnterWorktree's default base was changed back toorigin/<default>(it had been localHEADsince v2.1.128), and that users who want to preserve unpushed commits in new worktrees should setworktree.baseRef: "head". This behavior change is not documented in the Worktree settings section or in the worktrees page.Suggested Improvement
Add
worktree.baseRefto the Worktree settings table:Also update the "Choose the base branch" section in the worktrees page to note that
worktree.baseRefcontrols this behavior and defaults toorigin/<default>.Impact
Medium - Makes feature difficult to understand
Additional Context
Changelog entry (v2.1.133):
Affected Pages:
worktree.baseRefmissing from settings tableworktree.baseRefor its effect on--worktreeandEnterWorktreebaseTotal scope: 2 pages affected