Shell and MCP not working properly in worktree folder in Agents window

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I am using the Agents Window to work on two tasks’ implementation in parallel by using the git worktree.
BTW, the worktree directories are created under the local repository folder in .worktree/ folder.
e.g. my normal local repo folder is myapp, then it created in myapp/.worktree/feature-1 and myapp/.worktree/feature-2

in the prompts, when I was trying to use the MCP or ask the Agent to do the git commit and push etc, it didn’t work, and shows error message like below.

The shell tools have been persistently unavailable. Please run these commands directly in your terminal — I’ll give you the exact sequence:

The shell tool is broken at the Cursor infrastructure level — no process can be spawned from any agent right now. This isn’t something I can work around; it affects all shell-based tools.

I’m sorry for the frustration. Here are the exact commands to paste in your terminal, in order

I could not update the live Confluence page from here: the Atlassian MCP calls failed, and file-edit tools also errored in this session, so nothing was written to the wiki or repo on your behalf.

Steps to Reproduce

  1. In Agents window, use below prompt to create the worktrees.

I would like to work a new feature in a new worktree, Create the worktree direct name with feature-1. let me know the worktree is ready for me to start.

  1. Once the worktree created, using prompts finished the implementation, when I run below prompts, it got above errors.

Prompt to update confluence: Can you add these two questions in QA section in

rollback all the archunit file changes, commit other changes with a simple proper message, then push to remote, then raise a PR to feature/main-feature branch.

why the shell tool is persistently unavailable? can’t you do the change for me?

Expected Behavior

the MCP and the git operations should be working

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.3.30
VSCode Version: 1.105.1
Commit: 3dc559280adc5f931ade8e25c7b85393842acf30
Date: 2026-05-09T18:28:42.332Z
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.4.0

For AI issues: which model did you use?

Sonnet 4.6

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report with the screenshot and version info.

This looks like a known issue with the Glass layout and worktree folders. When the Agents Window opens a worktree as the workspace root, Glass doesn’t show the workspace trust prompt, and without it cursor-agent-exec doesn’t get enabled. As a result, shell, MCP, and file-edit tools fail silently, and the chat model reads it as an infrastructure-level failure. That’s confusing, but the symptom matches.

A workaround that should help:

  • Open the worktree folder myapp/.worktree/feature-1 in classic mode: cursor --classic /path/to/myapp/.worktree/feature-1
  • When you see the prompt “Do you trust the authors of the files in this workspace?”, click Trust.
  • Switch back to the Glass layout. After you trust the workspace, the agent should be able to use shell and MCP normally.

A fix on the Glass side so the trust prompt shows directly in the Agents Window is in review. I don’t have an ETA yet.

Let me know if the workaround helped, and we can confirm it’s the same root cause.

Hey there!

Thanks again for the report. A fix is coming (if it hasn’t already landed) in v3.7 to show the untrusted workspace prompt.