[Feature Request] Add configurable worktree base path with template support
Bug Description
EnterWorktree currently hardcodes new worktrees to <repo>/.claude/worktrees/<name>. Many users (and tools like git-worktree-runner / git gtr) use a sibling-folder convention — {reporoot}-worktrees/<name>/ — to keep worktrees out of the repo tree, avoid .gitignore clutter, and group all branches of a repo at the same filesystem level.
The current worktree settings only expose symlinkDirectories, sparsePaths, and baseRef. There's no way to redirect the create-path.
Request: add a worktree.basePath (or similar) setting that accepts:
- An absolute path, OR
- A template with {repoRoot} / {repoName} placeholders so a single user-level setting works across all repos. e.g. "{repoRoot}-worktrees" resolves to /Users/me/src/foo-worktrees/ for any repo at /Users/me/src/foo/.
Workaround today: create the worktree externally (git gtr new <name> or git worktree add) and then have Claude join it via EnterWorktree(path: ...). Functional but requires the user to set up the worktree themselves — defeats the convenience of /enter-worktree.
Bonus: if implemented, also respect git gtr's configured base path via .gtrconfig auto-detection, so users of that tool get the right behavior with zero settings.
Environment Info
- Platform: darwin
- Terminal: tmux
- Version: 2.1.142
- Feedback ID: a9c869d4-d41d-455c-85ad-a18c736519b7
Errors
[{"error":"Error: ECONNREFUSED\n at from (/$bunfs/root/src/entrypoints/cli.js:118:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:126:12906)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:125:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:251:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:128:2467)\n at async s7_ (/$bunfs/root/src/entrypoints/cli.js:252:277804)\n at async A68 (/$bunfs/root/src/entrypoints/cli.js:408:5977)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T14:33:01.438Z"},{"error":"Error: ECONNREFUSED\n at from (/$bunfs/root/src/entrypoints/cli.js:118:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:126:12906)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:125:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:251:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:128:2467)\n at async s7_ (/$bunfs/root/src/entrypoints/cli.js:252:277804)\n at async A68 (/$bunfs/root/src/entrypoints/cli.js:408:5977)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T14:37:06.428Z"},{"error":"Error: Was there a typo in the url or port?\n at from (/$bunfs/root/src/entrypoints/cli.js:118:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:126:12906)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:125:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:251:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:128:2467)\n at async s7_ (/$bunfs/root/src/entrypoints/cli.js:252:277804)\n at async A68 (/$bunfs/root/src/entrypoints/cli.js:408:5977)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T14:37:15.099Z"},{"error":"Error: ECONNREFUSED\n at from (/$bunfs/root/src/entrypoints/cli.js:118:7862)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:126:12906)\n at emitError (node:events:43:23)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:125:1149)\n at emitError (node:events:43:23)\n at <anonymous> (node:_http_client:251:22)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/src/entrypoints/cli.js:128:2467)\n at async s7_ (/$bunfs/root/src/entrypoints/cli.js:252:277804)\n at async A68 (/$bunfs/root/src/entrypoints/cli.js:408:5977)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T14:37:16.154Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗