# Update on Git Worktree Support (Broken LSP & AI Features)

**URL:** <https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479>\
**Category:** Bug Reports\
**Tags:** language-servers, indexing, context, worktrees\
**Created:** [July 23, 2026, 3:09pm UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479 "2026-07-23T15:09:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbsUtl](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@sbsUtl](https://forum.cursor.com/u/sbsUtl)\
**Post date:** [July 23, 2026, 3:09pm UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/1 "2026-07-23T15:09:37Z")

</div>

Hi team,

I’m opening this thread to request an update on an ongoing issue regarding proper Git worktree support in Cursor.

As noted in previous discussions, because Cursor struggles to parse the `.git` pointer file (as opposed to a standard `.git` folder), opening a worktree directly breaks several basic IDE capabilities:

- Language Server (LSP) Features: Basic features like Find All References, Go to Definition, and formatting either fall back to limited modes or stop working entirely.

- AI & Agent Features: File referencing in chat (`@file`), codebase context indexing, and AI code reviews fail or return incomplete results.

This is a known issue that has been raised a few times over the past year:

- [Agent Review fails in Git worktree with multi-root workspace](https://forum.cursor.com/t/agent-review-fails-in-git-worktree-with-multi-root-workspace/147025) (Dec 2025)

- [Cursor IDE Fails to Detect Git Worktrees](https://forum.cursor.com/t/cursor-ide-fails-to-detect-git-worktrees/148121) (Jan 2026)

- [Cursor cannot be used on a git worktree](https://forum.cursor.com/t/cursor-cannot-be-used-on-a-git-worktree/158281) (Apr 2026)

Since worktrees are an essential part of Cursor workflows, especially when running parallel AI agent tasks that I want to govern and observe, this continues to be a major blocker to using Cursor efficiently.

According to a comment in the April thread, a fix was currently in development. Could someone from the Cursor team provide an update on its progress or a general timeline for when we might see a fix?

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [July 23, 2026, 3:09pm UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/2 "2026-07-23T15:09:47Z")

</div>

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)?**
> 
> - Editor, Tab & Chat (autocomplete, Composer, in-editor agent)
> - Terminal & commands
> - Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)
> - MCP & tools
> - Cloud Agents & Automations ([cursor.com/agents](http://cursor.com/agents), scheduled/event)
> - BugBot & Code Review
> - Cursor CLI
> - Cursor Mobile
> - Remote (SSH / Dev Containers / WSL)
> - Account, billing & login
> - Something 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!
> 
> 1. …
> 2. …
> 3. …
> 
> * * *
> 
> **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
> 
> ```auto
> 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!

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [July 24, 2026, 7:54am UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/7 "2026-07-24T07:54:31Z")

</div>

Hey there!

The good news is that worktree support has moved a lot since that April thread, and the blanket “Cursor can’t parse the `.git` pointer file, so LSP and AI features break” description no longer matches current behavior on the latest versions (3.12.x). Opening a worktree directly now detects the repo, and codebase indexing and `@file` context work in it. So this is worth a fresh look rather than an “is it fixed yet” status.

A few specifics:

Using worktrees in the IDE (project window). The old Local/Cloud/Worktree dropdown was replaced with slash commands in the editor agent chat:

- `/worktree [branch=<name>] <task>` creates a worktree and starts an agent in it
- `/apply-worktree` merges the changes back into your main branch
- `/delete-worktree` removes the worktree
- `/best-of-n <model1,model2,...> <task>` runs the same prompt across multiple models in parallel

@deanrie broke this down in detail here: [Does cursor IDE agent allow to open worktree from workspace](https://forum.cursor.com/t/does-cursor-ide-agent-allow-to-open-worktree-from-workspace-not-the-agents-window/164146). Docs: [Worktrees](https://cursor.com/docs/configuration/worktrees).

The one real, intentional limitation. For worktree agent workspaces inside the Agents Window, language servers are off by default. That is a deliberate performance choice, since running many parallel worktrees can spin up a lot of LSP processes. It is the most likely reason you would see Find All References / Go to Definition / formatting fall back to limited modes in a worktree today. You can turn it back on: open a file in that workspace and enable the LSP toggle for it (look for Enable LSPs for Worktrees under the workspace’s Code Intelligence / LSP settings).

If you want full language features right now, open the worktree as a regular editor window. For example, create it yourself with `git worktree add ~/some/path` and open that folder normally. Externally created worktrees are treated as first-class now, so you get the full language-server experience there.

We’re continuing to invest in worktree and LSP support, so I don’t have a specific ETA to share on the remaining Agents-Window pieces. If you retest on the latest build and still hit a specific flow that’s broken, could you reply with:

- Your Cursor version (Help \> About)
- The exact flow (a worktree opened directly as a window vs. an Agents-Window worktree agent) and which feature (`@file`, Go to Definition, AI review, etc.)
- A quick repro

That lets us track and fix the specific case rather than the general “worktrees are broken” bucket. Thanks!

---

<div class="post-metadata">

**Author:** ![sbsUtl](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@sbsUtl](https://forum.cursor.com/u/sbsUtl)\
**Post date:** [August 6, 2026, 10:30am UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/8 "2026-08-06T10:30:42Z")

</div>

Hi @mohitjain

Thanks for the comprehensive reply!

I have been speaking mostly about the editor (IDE) window and it’s support, when opening a worktree directory.

After checking and verifying your solution, I’ve found out the following:

1. In the IDE the language server really do not start by default and require a restart

2. When opening files the editor chooses the language as the worktree equivalent (for example for Go, it chooses the language as Worktree Go by default) and that requires changing the language mode manually to allow actions such as see implementations and so on. But it’s per file and quite cumbersome

3. Inside the agents / chat sidebar, it does not support `@file` still, even after restarting the language server

all 3 of those are relevant to the following version info

```ini
Version: 3.14.27 (Universal)
VS Code Extension API: 1.128.0
Commit: 047548b00c1a079373d74d00183f32510a4a41e0
Date: 2026-08-04T03:29:11.183Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.5.0

```

I created the worktree initially from the agents window, and then went into it by clicking the “Editor ↗” to open the editor window, since then I also closed and re-entred to that same editor window directly from the IDE using the “File → Open Recent → XXXX”

I’ll try to see how I can reproduce it in a new project, and will update that thread

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [August 7, 2026, 1:14pm UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/9 "2026-08-07T13:14:39Z")

</div>

All three happen because that worktree lives under `~/.cursor/worktrees` (created from the Agents Window), and Cursor treats anything there as a managed worktree workspace - opening it via “Editor ↗” or Open Recent keeps that mode. In that mode, language servers are off by default and `@file` is scoped to the owning agent, so a plain editor window won’t get full LSP or list those files (restarting the LSP won’t change the `@file` part).

Cleanest fix for full IDE features right now - use a standalone worktree outside `~/.cursor/worktrees`:

`git worktree add ~/dev/myproj-feature <branch>`

then File → Open Folder on it. You’ll get normal language servers, language modes, and `@file` there.

If you want to stay in the Agents-Window worktree: turn on Enable LSPs for Worktrees in the LSP settings, then fully restart the window (that’s why a restart was needed).

On the “Worktree Go” language mode - I haven’t been able to pin that down on my side. If it shows up in your clean repro, a screenshot of the language indicator (bottom-right status bar) plus the version would help me get it tracked.

---

<div class="post-metadata">

**Author:** ![sbsUtl](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@sbsUtl](https://forum.cursor.com/u/sbsUtl)\
**Post date:** [August 12, 2026, 6:37am UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/10 "2026-08-12T06:37:52Z")

</div>

Hi @mohitjain

Thanks for the swift reply! I will try that.  
That does raises a followup question, can I set in Cursor the default behavior for creating a worktree from the agents window to be outside of the `.cursor/worktrees` or at least choose that when creating the new worktree instead of the manual option? If not, I will open a feature request for that.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [September 11, 2026, 6:45am UTC](https://forum.cursor.com/t/update-on-git-worktree-support-broken-lsp-ai-features/166479/13 "2026-09-11T06:45:58Z")

</div>

Closed on September 11, 2026, 6:45am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
