Describe the Bug
I’m having difficulty using worktrees in the new Cursor 3 agent window. Executing agent work in the older editor window using the /worktree skill respects the .cursor/worktrees.json “setup-worktree” configuration when creating the worktree. The new agent window (glass), does not appear to use the .cursor/worktrees.json “setup-worktree” config when using a worktree environment. This inconsistent behavior is breaking previously functioning workflows when moving from the editor window to the agent window.
Additionally, I’m not able to debug the agent or editor windows worktree setup using the instructions in the relevant cursor docs. I’m unable to find the Worktrees Setup filter in the output panel of either window (agent or editor). It seems to me the docs have fallen out of date.
Steps to Reproduce
In a next.js project, create a .cursor/worktrees.json file with a basic “setup-worktree” config:
{
"setup-worktree": [
"npm ci"
]
}
Instruct an agent to “run ls” in both the agent window (in a worktree environment) and the editor window (using the /worktree skill)
Look at the output the agent returns or manually inspect the worktree’s directory. The editor window’s worktree will have a node_modules/ folder and the agent window’s worktree will not demonstrating that the agent window did not run the setup instructions in .cursor/worktrees.json.
Expected Behavior
The agent window worktree environment should have a way of setting up the worktree before the agent does work, preferably with the “setup-worktree” config in .cursor/worktrees.json.
For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)
For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…
Additional Information
Add any other context about the problem here.
Does this stop you from using Cursor?
Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue
The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!
Hey, thanks for reporting this with the clear repro steps.
This is a confirmed bug. The Agents Window’s worktree creation path was missing the step that reads and runs your .cursor/worktrees.json setup commands. A fix has already shipped.
You’re on 3.1.10, and the fix landed in 3.1.16. Updating Cursor should resolve the setup inconsistency between the two windows. After updating, your setup-worktree commands (like npm ci) should run automatically when the Agents Window creates a worktree, just like they do in the Editor window.
Regarding the “Worktrees Setup” Output channel: this channel is created on-demand when a worktree setup actually runs. Since the Agents Window wasn’t running setup at all on your version, the channel wouldn’t appear there. After updating, you should see it when creating an agent with the Worktree setting. If the docs debugging section still doesn’t match what you see after updating, let us know and we’ll get the docs updated.