claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Claude Code doesn't detect that the IDE is cursor

Open DashBarkHuss opened this issue 6 months ago • 2 comments

Environment

  • Platform (select one):
    • [✅ ] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.3
  • Operating System: macOS 15.5
  • Terminal: Cursor integrated terminal

Cursor Version: 0.50.6 VSCode Version: 1.96.2

Bug Description

Claude Code doesn't detect that the IDE is cursor

Steps to Reproduce

Run

/ide

Expected Behavior

I expect Claude to detect that I'm using Cursor. I

Actual Behavior

Returns

>  Select IDE                                                                                                                                                                                                                                                      │
│  Connect to an IDE for integrated development features.                                                                                                                                                                                                          │
│                                                                                                                                                                                                                                                                  │
│  No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.  

I don't see any way to set the IDE myself.

DashBarkHuss avatar May 23 '25 23:05 DashBarkHuss

Thanks for the report! What does /status say about IDE?

igorkofman avatar May 23 '25 23:05 igorkofman

try cursor --install-extension ~/.npm-global/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

basher83 avatar May 24 '25 06:05 basher83

Thanks for the report! What does /status say about IDE?

/status
IDE Integration • /config
 ⚠  Error installing Cursor extension: 1: ENOENT
    Please restart your IDE and try again.

I got the same error after I restarted cursor.

DashBarkHuss avatar May 24 '25 17:05 DashBarkHuss

@DashBarkHuss Did you try the direct install with cursor from the CLI? If you have Claude code working you can just install the extension from the npm directory manually. Just double check your npm location for your machine. Or better yet, just feed this info to Claude code and have him do it for you

basher83 avatar May 24 '25 18:05 basher83

try cursor --install-extension ~/.npm-global/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix @DashBarkHuss Did you try the direct install with cursor from the CLI? If you have Claude code working you can just install the extension from the npm directory manually. Just double check your npm location for your machine. Or better yet, just feed this info to Claude code and have him do it for you

once I found the correct directory the direct installation worked and now claude code recognizes cursor.

cursor --install-extension /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix
> /ide 
  ⎿  Connected to Cursor.

DashBarkHuss avatar May 24 '25 19:05 DashBarkHuss

It won't let me reopen the issue, but the status command shows that there's still an error with the installing the cursor extension. Restarting the IDE didn't fix it.

 IDE Integration • /config
 ✔  Connected to Cursor extension
 ⚠  Error installing Cursor extension: 1: ENOENT
    Please restart your IDE and try again.

DashBarkHuss avatar May 24 '25 19:05 DashBarkHuss

I get the error too so I wrote a gist how to solve it manually just in case based on this issue. https://gist.github.com/sotayamashita/3da81de9d6f2c307d15bf83c9e6e1af6

sotayamashita avatar May 25 '25 13:05 sotayamashita

Apparently this doesn't work in linux?

I ran cursor --install-extension ~/.claude/local/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix and nothing happens, and also if I press ctrl+shift+p and select Developer: Install Extension From Location... and navigate to ~/.claude/local/node_modules/@anthropic-ai/claude-code/vendor/ cursor doesn't see the claude-code.vsix. If I run /ide command Claude says "No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.".

I'm running: Kubuntu 6.13.9-x64v3-xanmod1 Claude Code v1.0.3 Cursor 0.50.7

Xupack88 avatar May 26 '25 11:05 Xupack88

I encountered the same issue where Cursor IDE wasn’t recognized by Claude Code, despite successful installation attempts via CLI. None of the provided solutions fully resolved my issue. However, I discovered a straightforward workaround that resolved it: 1. Manually located the Claude Code extension .vsix file within my local Claude installation directory. 2. Dragged this .vsix file directly into the Cursor Extensions panel.

The extension installed successfully and immediately became operational within Cursor.

This approach bypassed the issues I encountered with automatic detection and CLI-based installation methods.

I hope this helps others experiencing similar issues!

AojdevStudio avatar May 28 '25 18:05 AojdevStudio

@Xupack88 It defiantly works in linux. To effectively troubleshoot this you need to take into account where and how node is installed and what OS you are on. So to better address this to a broader audience you can do the following if npm is installed globally:

  1. npm list -g --depth 0 (reference: where does npm install the packages )
  2. Manually install the claude-code.vsix via the file path for where you have Claude Code installed. If you look at the npm repo you will see it is located at: @anthropic-ai/claude-code/vendor/claude-code.vsix (referance: npm claude code )
  • @sotayamashita created a gist (see above) with a great way to find where claude code is installed on your specific machine using claude code itself.

basher83 avatar May 28 '25 20:05 basher83

I encountered the same issue where Cursor IDE wasn’t recognized by Claude Code, despite successful installation attempts via CLI. None of the provided solutions fully resolved my issue. However, I discovered a straightforward workaround that resolved it: 1. Manually located the Claude Code extension .vsix file within my local Claude installation directory. 2. Dragged this .vsix file directly into the Cursor Extensions panel.

The extension installed successfully and immediately became operational within Cursor.

This approach bypassed the issues I encountered with automatic detection and CLI-based installation methods.

I hope this helps others experiencing similar issues!

This worked, thanks!

Xupack88 avatar May 29 '25 08:05 Xupack88

Claude Code Status v1.0.5

Working Directory L /home/yolte

IDE Integration • /config ✔ Installed VS Code extension

Model • /model L Default (claude-sonnet-4-20250514)

But still unable to find the IDE

Select IDE │ │ Connect to an IDE for integrated development features. │ │ │ │ No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.

burakyalti avatar May 29 '25 14:05 burakyalti

Could you try 1.0.6 - it should fix this!

On Thu, May 29, 2025 at 7:08 AM Burak YALTI @.***> wrote:

burakyalti left a comment (anthropics/claude-code#1279) https://github.com/anthropics/claude-code/issues/1279#issuecomment-2919526507

Claude Code Status v1.0.5

Working Directory L /home/yolte

IDE Integration • /config ✔ Installed VS Code extension

Model • /model L Default (claude-sonnet-4-20250514)

But still unable to find the IDE

Select IDE │ │ Connect to an IDE for integrated development features. │ │ │ │ No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.

— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/1279#issuecomment-2919526507, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADSWQUMFKXG76RNMMYWOBL3A4IGBAVCNFSM6AAAAAB5Z2QNECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMJZGUZDMNJQG4 . You are receiving this because you commented.Message ID: @.***>

igorkofman avatar May 29 '25 20:05 igorkofman

Updated to 1.0.7, but still my claude code fails to detect the cursor IDE inside devcontainer (though it worked on local).

Here's my workaround;

{
  "features": {
    // Install claude-code
    "ghcr.io/anthropics/devcontainer-features/claude-code:1": {}
  },
  "customizations": {
    "vscode": {
      "extensions": [
        "/usr/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix",  // <- Set path to claude-code.vsix
      ]
    }
  },
}

Hope this helps someone.

otenim avatar May 30 '25 17:05 otenim

Had the same problem, I went in the extension tab installed npm intellissens clicked on the claude code > went back to the terminal > claude > and I had a status. Finally after 3 hours lol

Safix94 avatar Jun 04 '25 16:06 Safix94

@Xupack88 It defiantly works in linux. To effectively troubleshoot this you need to take into account where and how node is installed and what OS you are on. So to better address this to a broader audience you can do the following if npm is installed globally:

  1. npm list -g --depth 0 (reference: where does npm install the packages )
  2. Manually install the claude-code.vsix via the file path for where you have Claude Code installed. If you look at the npm repo you will see it is located at: @anthropic-ai/claude-code/vendor/claude-code.vsix (referance: npm claude code )
  • @sotayamashita created a gist (see above) with a great way to find where claude code is installed on your specific machine using claude code itself.

Thank you very much! It worked but /status still shows this:

IDE Integration • /config ✔ Connected to Cursor extension ⚠ Error installing Cursor extension: 1: 1 The setuid sandbox is not running as root. Common causes: * An unprivileged process using ptrace on it, like a debugger. * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...) Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted [955160:0604/221400.536811:FATAL:zygote_host_impl_linux.cc(207)] Check failed: . : Argumento inválido (22)

titobsala avatar Jun 04 '25 21:06 titobsala

try cursor --install-extension ~/.npm-global/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix @DashBarkHuss Did you try the direct install with cursor from the CLI? If you have Claude code working you can just install the extension from the npm directory manually. Just double check your npm location for your machine. Or better yet, just feed this info to Claude code and have him do it for you

once I found the correct directory the direct installation worked and now claude code recognizes cursor.

cursor --install-extension /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

/ide ⎿ Connected to Cursor.

I had the same problem, this also worked for me!

jesse-windebank avatar Jun 07 '25 19:06 jesse-windebank

I tried doing what most of you have done. I am on Fedora 42 here are my system info: Cursor Version: 1.0.0 VSCode Version: 1.96.2 Commit: 53b99ce608cba35127ae3a050c1738a959750860 Date: 2025-06-04T19:26:40.367Z Electron: 34.5.1 Chromium: 132.0.6834.210 Node.js: 20.19.0 V8: 13.2.152.41-electron.0 OS: Linux x64 6.14.9-300.fc42.x86_64

my claude-code is at /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

I ran this in the terminal of an open Cursor session: cursor --install-extension /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

When I run it a new Cursor window opens, and I still don't see the IDE connect and it says No available IDEs

Any suggestions are appreciated!

kryptobaseddev avatar Jun 09 '25 02:06 kryptobaseddev

For me it worked by installing the vsix file manually, before that I got the following:

Error installing Cursor extension: 1: 1 [225580:0602/225531.492518:ERROR:ozone_platform_x11.cc(246)] Missing X server or $DISPLAY [225580:0602/225531.492547:ERROR:env.cc(257)] The platform failed to initialize. Exiting. Please restart your IDE and try again.

LeonKohli avatar Jun 10 '25 10:06 LeonKohli

This is the final method that works.

  • first step: install Claude code
  • run: npm list -g @anthropic-ai/claude-code
  • Copy the Claude code extension to a folder u can easily access
  • cp /use your path/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix ~/Downloads/
  • Open cursor and Ctrl+Shift+p,
  • Type: Extension install from VSIX
  • Locate the claude-code.vsix select it, and after installation, close and reopen cursor: open your terminal and enjoy using claude

KcPele avatar Jun 11 '25 17:06 KcPele

This is the final method that works.

  • first step: install Claude code
  • run: npm list -g @anthropic-ai/claude-code
  • Copy the Claude code extension to a folder u can easily access
  • cp /use your path/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix ~/Downloads/
  • Open cursor and Ctrl+Shift+p, type: Install extension from location
  • Locate the claude-code.vsix select it and after installation close and reopen cursor: open your terminal and enjoy using claude

Your steps didn't directly help me but I ended up figuring it out, there is a 'VSIX' specific install in vscode/cursor here is what I ended up do, I hope this helps someone else!

  1. Install Claude code
  2. run: npm list -g @anthropic-ai/claude-code
  3. cp /usr/local/lib/node_modules/@anthropic-ai/claude-code/vendor ~/Downloads/
  4. Open Cursor
  5. Press Ctrl+Shift+P to open command palette
  6. Type "Extensions: Install from VSIX..." (not "Developer: Install extension from location...")
  7. Navigate to /home/username/Downloads/claude-code.vsix
  8. Select the file and click "Install"
  9. Restart Cursor

The key is using "Extensions: Install from VSIX..." instead of "Developer: Install extension from location...".

kryptobaseddev avatar Jun 11 '25 18:06 kryptobaseddev

It's the same thing. U got it

On Wed, 11 Jun 2025, 19:14 Keaton Hoskins, @.***> wrote:

kryptobaseddev left a comment (anthropics/claude-code#1279) https://github.com/anthropics/claude-code/issues/1279#issuecomment-2963753202

This is the final method that works.

  • first step: install Claude code
  • run: npm list -g @anthropic-ai/claude-code
  • Copy the Claude code extension to a folder u can easily access
  • cp /use your @.***/claude-code/vendor/claude-code.vsix ~/Downloads/
  • Open cursor and Ctrl+Shift+p, type: Install extension from location
  • Locate the claude-code.vsix select it and after installation close and reopen cursor: open your terminal and enjoy using claude

Your steps didn't directly help me but I ended up figuring it out, there is a 'VSIX' specific install in vscode/cursor here is what I ended up do, I hope this helps someone else!

  1. Install Claude code
  2. run: npm list -g @anthropic-ai/claude-code
  3. cp @.***/claude-code/vendor ~/Downloads/
  4. Open Cursor
  5. Press Ctrl+Shift+P to open command palette
  6. Type "Extensions: Install from VSIX..." (not "Developer: Install extension from location...")
  7. Navigate to /home/keatonhoskins/Downloads/claude-code.vsix
  8. Select the file and click "Install"
  9. Restart Cursor

The key is using "Extensions: Install from VSIX..." instead of "Developer: Install extension from location...".

— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/1279#issuecomment-2963753202, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJDTO3KXC2KEJKDQRSHWY33DBWZ3AVCNFSM6AAAAAB5Z2QNECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNRTG42TGMRQGI . You are receiving this because you commented.Message ID: @.***>

KcPele avatar Jun 11 '25 18:06 KcPele

I encountered the same issue where Cursor IDE wasn’t recognized by Claude Code, despite successful installation attempts via CLI. None of the provided solutions fully resolved my issue. However, I discovered a straightforward workaround that resolved it: 1. Manually located the Claude Code extension .vsix file within my local Claude installation directory. 2. Dragged this .vsix file directly into the Cursor Extensions panel.

The extension installed successfully and immediately became operational within Cursor.

This approach bypassed the issues I encountered with automatic detection and CLI-based installation methods.

I hope this helps others experiencing similar issues!

YES! This worked also in Arch Linux - this post should be more upvoted! :D Thanks alot for this

mbs1337 avatar Jun 12 '25 13:06 mbs1337

I didn't see the vsix file in my downloads folder or anywhere else, so I prompted in code "i need to download the local vsix claude code file to connect claude code with cursor - going to the extensions marketplace is not a solution as there are too many fake extensions" and it downloaded to my downloads folder. After that I just dragged the file into extensions and it showed up in /ide!

rogerclue avatar Jun 15 '25 05:06 rogerclue

This is what I did and it worked:

Step 1: Run the below command cursor --install-extension \ ~/.claude/local/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

Step 2: In Cursor press ⌘ ⇧ P → “Shell Command: Install ‘cursor’ command in PATH”, then reopen your terminal and try again. Claude’s auto-installer only works when the cursor binary is discoverable.

Ayman-tron avatar Jun 15 '25 21:06 Ayman-tron

I ran into the same issue when using Cursor with a Dev Container, and after some trial and error, I was able to resolve it. My solution is similar to the general flow others have described, but here’s what specifically worked for me:

  1. Run the following to check where claude-code is installed:
npm list -g claude-code
  1. Then install the extension manually using the following command (replace the path with the actual one from step 1
cursor --install-extension <your-path>/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

touyu avatar Jun 16 '25 14:06 touyu

Same issue for me, it seems Claude Code updated and in some moment integration with cursor disappeared. It also dont work in vscode and vscode insider preview. I tried to install extension in insider preview with all mentioned above options. Every time extension installed, and it started on some port. Also it successfully creates lock file in ~/.claude/ide folder. In Claude Code /status shows me ✔️ Installed VS Code extension.

So it seems extension working fine, I dont see any issue with it. But command /ide shows me No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running. And I dont know how to debug this problem more detailed. Claude code version 1.0.31

00xObi avatar Jun 21 '25 15:06 00xObi

UPD. I found problem: In new versions Claude Code extension creates lock files into ~/.claude/ide but claude code itself tries to find lock files in ~/.config/claude/ide. Symlinks can resolve this issue.

00xObi avatar Jun 22 '25 05:06 00xObi

UPD. I found problem: In new versions Claude Code extension creates lock files into ~/.claude/ide but claude code itself tries to find lock files in ~/.config/claude/ide. Symlinks can resolve this issue.

THANK YOU. Worked for me on Arch getting external terminal to recognize ide (the extension inside ide working properly required VSCODE_IPC_HOOK_CLI=/tmp/vscode-ipc-$(whoami).sock to be passed at launch - so many workarounds :X

ghost avatar Jun 22 '25 18:06 ghost

For me the problem was on Windows, so I just started Cursor from the wsl terminal using cursor . and then all works fine, installing the pluggin and running the integration so Claude gets the context too

sandyeveliz avatar Jun 26 '25 14:06 sandyeveliz