Agent Worktrees (
|
| Command | Action |
|---|---|
| Agent Worktrees: Create | Pick a git root, enter a slug, create branch + worktree, run setup |
| Agent Worktrees: List / Open | Quick-pick managed worktrees and open the folder |
| Agent Worktrees: Remove | git worktree remove (optional force after confirm) |
| Agent Worktrees: Run Post-Create Setup | Re-run setup for an existing worktree |
Also available from the Agent Worktrees activity-bar view.
Settings
| Setting | Default | Meaning |
|---|---|---|
agentWorktrees.directory |
.worktrees |
Folder under each repo root |
agentWorktrees.branchPrefix |
feat/ |
Branch prefix + slug |
agentWorktrees.postCreateScript |
"" |
Script path (absolute or repo-relative). Sets ROOT_WORKTREE_PATH |
agentWorktrees.openInNewWindow |
false |
Open worktrees in a new window |
If postCreateScript is empty, the extension reads .cursor/worktrees.json using the same contract as Cursor worktrees (setup-worktree-unix / setup-worktree-windows / setup-worktree).
Delagen note
This extension is generic. Delagen’s multi-repo agent policy, skill, and heavy setup (env copy, node_modules/vendor rsync, Compose project names) stay in the Delagen umbrella:
.cursor/skills/delagen-git-worktree.cursor/rules/git-worktree-per-chat.mdc.cursor/setup-worktree-unix.shterraform→docs/cursor-worktrees.md
In a Delagen checkout, Create still picks up .cursor/worktrees.json → setup-worktree-unix.sh automatically.
Develop
pnpm install
pnpm test
pnpm compile
pnpm package
See PUBLISHING.md for Open VSX / Marketplace publisher setup.