Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
The new UI automates worktree creation with agents, but doesn’t respect existing configurations and documentation at all.
When the Agents Window creates a local worktree for a single-model agent, the
.cursor/worktrees.json setup-worktree-unix runner is never invoked.
Cursor’s WorktreeManager performs the git worktree add and immediately
hands control to the agent — the worktree-setup runner code path does not
fire. The “Worktrees Setup” Output channel is not even created. As a result,
the agent starts working in a worktree with no project-specific dependency setup.
Same .cursor/worktrees.json runs correctly when invoked from the Editor
window via /worktree, so the config itself is valid.
This appears to be the macOS continuation of the previously reported (and
auto-closed) issue:
Wortrees setup doesn't run on single model wortree creation
…where @stern87 reported the same on macOS in March, with no fix landed.
It also matches @Colin’s reply in
Cursor 3: Worktrees & Best-of-N - #13 by Colin
(“Better support for worktrees in the Agents Window is coming soon”).
Steps to Reproduce
- Repo with
.cursor/worktrees.jsoncontaining asetup-worktree-unixvalue
that does something visibly heavy (e.g. installs deps, copies an env file,
touches a marker). Example used in repro:
{
“setup-worktree-unix”: [“./agents/worktree/create-worktree.sh --setup-only”]
} - Open the repo in Cursor 3.1.15.
- Open the Agents Window (Cmd+Shift+P → Agents Window).
- Create a new agent → enable the “Worktree” setting → keep “Use multiple
models” off → send a trivial prompt. - After ~3s, switch to the worktree’s window. View → Output → channel
dropdown.
Expected Behavior
- The “Worktrees Setup” Output channel exists.
- It contains
[worktree-setup] checking config {...}followed by either a
selected setup spec+started terminal sessionblock, or a clear
“skipping because ” line. - The setup commands actually run before the agent acts in the worktree.
Operating System
MacOS
Version Information
Version: 3.1.15
VSCode Version: 1.105.1
Commit: 3a67af7b780e0bfc8d32aefa96b8ff1cb8817f80
Date: 2026-04-15T01:46:06.515Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0
Does this stop you from using Cursor
Yes - Cursor is unusable