Inconsistent worktree setup between agent and editor windows

Where does the bug appear (feature/product)?

Cursor IDE
Cursor CLI
Background Agent (GitHub, Slack, Web, Linear)
BugBot
Somewhere else…


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

  1. In a next.js project, create a .cursor/worktrees.json file with a basic “setup-worktree” config:
{
  "setup-worktree": [
    "npm ci"
  ]
}
  1. Instruct an agent to “run ls” in both the agent window (in a worktree environment) and the editor window (using the /worktree skill)
  2. 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.


Operating System

Windows 10/11
MacOS
Linux


Version Information

Version: 3.1.10 (Universal)
VSCode Version: 1.105.1
Commit: dacbe9b31599a253763e4910eb6ab38704653320
Date: 2026-04-13T11:39:16.806Z
Layout: editor
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.4.0

Does this stop you from using Cursor?

Yes - Cursor is unusable
Sometimes - I can sometimes use Cursor
No - Cursor works, but with this issue

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Cursor IDE
  • Cursor CLI
  • Background Agent (GitHub, Slack, Web, Linear)
  • BugBot
  • Somewhere else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!


Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

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.

Another user reported the same setup issue here: Worktrees.json ignored in Cursor Agents/Glass UI

Working fine in 3.1.17 :raising_hands: