[BUG] Error installing VS Code extension: 1: ENOENT Please restart your IDE and try again.

Resolved 💬 29 comments Opened May 22, 2025 by fcoury Closed Jun 3, 2025
💡 Likely answer: A maintainer (blois, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code
  • Claude CLI version: v1.0.1
  • Operating System: macOS 15.4
  • Terminal: VSCode Terminal

Bug Description

 Claude Code Status v1.0.1

 Working Directory 
  L /Users/fcoury/code/paypol

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

 Account • /login
  L Login Method: Claude Max Account (20x)
  L Email: ...

 Memory • /memory
  L project: CLAUDE.md

 Model • /model
  LDefault Uses the best available model for Max usage limits (currently
   Opus)

Steps to Reproduce

  1. Open VSCode terminal
  2. Type claude and enter
  3. Type /status

Expected Behavior

VSCode Extension is Installed

Actual Behavior

Error installing VS Code extension: 1: ENOENT
Please restart your IDE and try again.

View original on GitHub ↗

29 Comments

blois collaborator · 1 year ago

From the same terminal, does which code resolve? If not, in VSCode can you try running the command Shell Command: Install 'code' command in PATH?

fcoury · 1 year ago
From the same terminal, does which code resolve? If not, in VSCode can you try running the command Shell Command: Install 'code' command in PATH?

It does:

> $ which code
/usr/local/bin/code

> $ echo $TERM_PROGRAM
vscode
igorkofman collaborator · 1 year ago

What does code --help return - is it actually VSCode or any chance it points to Cursor?

fcoury · 1 year ago
What does code --help return - is it actually VSCode or any chance it points to Cursor?

Here it goes:

> $ code --help | head -10
Visual Studio Code 1.100.2

Usage: code [options][paths...]

To read from stdin, append '-' (e.g. 'ps aux | grep code | code -')

Options
  -d --diff <file> <file>                    Compare two files with each
                                             other.
  -m --merge <path1> <path2> <base> <result> Perform a three-way merge by
...
fcoury · 1 year ago

A few more data points:

  • Thought it could be related to the fact that I use fish, tried with bash and zsh and same issue
  • v1.0.2 just came out, upgraded but same issue
  • Tried it with cursor as well -- same error
markwaddle · 1 year ago

i am experiencing the same issue, also with v1.02.

Claude CLI version: v1.0.2
Operating System: macOS 15.5 (x86)
Terminal: VSCode Terminal

fcoury · 1 year ago

It works after I manually installed the extension:

fcoury@mba ~/.c/l/n/@anthropic-ai/claude-code/vendor
> $ code --install-extension claude-code.vsix
Installing extensions...
Extension 'claude-code.vsix' was successfully installed.

> $ claude
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /Users/fcoury/code/paypol                  │
╰───────────────────────────────────────────────────╯


> /ide 
  ⎿  Connected to Visual Studio Code.

╭───────────────────────────────────────────────────────────────────────────╮
│ >                                                                         │
╰───────────────────────────────────────────────────────────────────────────╯
  ? for shortcuts                                                         ◯
kartikmandar · 1 year ago

Why can't I install claude-code extension in mac os but works perfectly in ubuntu?
I am following their guide by using claude in the integrated terminal for vs-code but it's not working in macos. Claude-code extension not even exists in vs-code extension marketplace at all. But this issue is specific to mac-os (for vs-code, windsurf, and cursor)

kartikmandar · 1 year ago

Also when using the /config inside claude repl session, macos doesn't show diff auto option at all, while ubuntu does!!

MainAero · 1 year ago

Same issue while using nvm.
Manual installation worked: code --install-extension ~/.nvm/versions/node/v22.7.0/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

dawidstruzik · 1 year ago

Installing it manually helped! I used this to find the extension: find ~ -name "*.vsix" 2>/dev/null

gusbicalho · 1 year ago

I was also able to install manually - thank you @fcoury !
/status shows:

Claude Code Status v1.0.2

 Working Directory 
  L /home/(...)

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

I imagine the cause in my case might be that I have code-insiders installed, and code is an alias:

$ which code
code: aliased to code-insiders
$ which code-insiders
/home/(...)/.vscode-server-insiders/bin/(...)/bin/remote-cli/code-insiders

Running in Ubuntu in WSL2.

fcoury · 1 year ago
I was also able to install manually - thank you @fcoury ! /status shows:

You're welcome! Glad you were able to install it!

I imagine the cause in my case might be that I have code-insiders installed, and code is an alias: `` $ which code code: aliased to code-insiders $ which code-insiders /home/(...)/.vscode-server-insiders/bin/(...)/bin/remote-cli/code-insiders ``

This is pure speculation and some analysis of their minimized code, but I think they use the TERM_PROGRAM env var to determine it:

> $ echo $TERM_PROGRAM
vscode

If yours is also set to vscode inside the Insiders (!) terminal, I don't think there should be a problem identifying the environment you're running on. But again, not 100% sure.

gusbicalho · 1 year ago

TERM_PROGRAM is indeed set to vscode - which I think is why claude attempts to install the extension. If I run claude in a normal WSL terminal outside VSCode, /status does not show the IDE Integration • /config section.

However the 1: ENOENT error suggests it tried to install something, but failed to find a file or directory...

It seems they essentially call execFile('code',...) - so it fails in my case because code is an alias, not an executable.

fcoury · 1 year ago
However the 1: ENOENT error suggests it tried to install something, but failed to find a file or directory... It seems they essentially call execFile('code',...) - so it fails in my case because code is an alias, not an executable.

Ah good catch! I thought it was a symlink and just now realized it's actually an alias 😁

gusbicalho · 1 year ago

Using a symlink instead of an alias does the trick:

~ ln -s "$(which code-insiders)" ~/bin/code
~ which code
/home/(...)/bin/code

And now if I run claude /status inside VSCode terminal I get:

Claude Code Status v1.0.2

 Working Directory 
  L /home/(...)

 IDE Integration • /config
 ✔  Connected to VS Code extension
 ✔  Installed VS Code extension

So yeah it seems the Claude CLI is not quite smart enough in how it detects and runs the VSCode CLI - although I'm not sure how it could do better

fcoury · 1 year ago
Using a symlink instead of an alias does the trick:

In mine and other mac user's case it weirder:

> $ which code
/usr/local/bin/code

> $ ls -lad /usr/local/bin/code
lrwxr-xr-x - root  7 Jan  2024 /usr/local/bin/code -> '/Applications/Visual Studio Code.app/Contents/Resources/app/bin'/code

> $ ls -la '/Applications/Visual Studio Code.app/Contents/Resources/app/bin'/code
.rwxr-xr-x 1.2k fcoury 14 May 19:12 '/Applications/Visual Studio Code.app/Contents/Resources/app/bin'/code

But we still get the ENOENT error.

lobochrome · 1 year ago

Yeah similar setup.

MacOS
fish shell (My suspect)

$ which code

/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code

(apparently I added this directly to my path? Can't remember doing it).

$ ls -la

-rwxr-xr-x 1 blobmueller staff 1160 May 15 07:05 /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code*

but

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

Also a few years ago I had code-insiders installed - but now it's uninstalled and I'm running vanilla only.

lobochrome · 1 year ago

Okay for me fixed it: my fish.config had a set to add the code binary directly to the PATH - but I also had the symlink present in /usr/local/bin removing /Applications/Visula Studio Code.app/... from PATH fixed it.

fcoury · 1 year ago
Okay for me fixed it: my fish.config had a set to add the code binary directly to the PATH - but I also had the symlink present in /usr/local/bin removing /Applications/Visula Studio Code.app/... from PATH fixed it.

Unfortunately not the case for me:

> $ ls -la /usr/local/bin/code
lrwxr-xr-x - root 15 Dec  2024 /usr/local/bin/code -> '/Applications/Visual Studio Code.app/Contents/Resources/app/bin'/code

> $ echo $PATH | grep Visual
<empty>
charlesvardeman · 1 year ago

I have the same issue on MacOS. I have node and vscode installed through homebrew (cask). I manually installed the extension and it does show up in the extensions on vscode, but doesn't seem to be installed through claude code /status even though it is connected to the extension.

$ echo $SHELL
/opt/homebrew/bin/bash
$ bash --version
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin23.4.0)

Claude code doesn't seem to see it.

 Claude Code Status v1.0.3

 Working Directory 
  L /Users/cvardema/dev/git/

 IDE Integration • /config
 ✔  Connected to VS Code extension
 ⚠  Error installing VS Code extension: 1: ENOENT
    Please restart your IDE and try again.
$ ls -lart /opt/homebrew/bin/claude
lrwxr-xr-x@ 1 cvardema  admin  52 May 25 09:27 /opt/homebrew/bin/claude -> ../lib/node_modules/@anthropic-ai/claude-code/cli.js

Code exe is installed in the homebrew /opt/homebrew/bin

 ls -lart /opt/homebrew/bin/code
lrwxr-xr-x  1 cvardema  admin  68 Feb 24  2023 /opt/homebrew/bin/code -> /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code

The extension bundle is in /opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/vendor where I installed it manually using code --install-extension

kindaidai · 1 year ago

I encountered the same issue.
I have set the default login shell in VSCode to fish. After changing it to zsh and launching claude, it installed successfully.

```sh
$ code --version
1.100.2
848b80aeb52026648a8ff9f7c45a9b0a80641e2e
arm64

$ claude --version
1.0.5 (Claude Code)


However, when I changed the login shell back to fish, an error occurred.
```shell
 IDE Integration • /config
 ✔  Connected to VS Code extension
 ⚠  Error installing VS Code extension: 1: ENOENT
    Please restart your IDE and try again.
igorkofman collaborator · 1 year ago

Thanks for your patience folks. We're tracked down the issue (mostly should impact folks using Fish inside VSCode). The fix should be out shortly, will update again once it's out!

igorkofman collaborator · 1 year ago

This should be fixed in 1.0.10 - please let us know if it works for you!

dkarni · 1 year ago
Same issue while using nvm. Manual installation worked: code --install-extension ~/.nvm/versions/node/v22.7.0/lib/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix

This worked! thanks

MikeyZhang75 · 12 months ago

Still experiencing the same issue as today

 ⚠  Error installing Cursor extension: 1: 1 Error: End of central directory record signature not found. Either not a zip file, or file is truncated.
        at Ef (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:28755)
        at file:///Applications/Cursor.app/Contents/Resources/app/out/vs/code/node/cliProcessMain.js:52:30083
        at /Applications/Cursor.app/Contents/Resources/app/node_modules/yauzl/index.js:40:7
        at /Applications/Cursor.app/Contents/Resources/app/node_modules/yauzl/index.js:190:5
        at Immediate.<anonymous> (/Applications/Cursor.app/Contents/Resources/app/node_modules/yauzl/index.js:705:38)
        at process.processImmediate (node:internal/timers:483:21) {
      code: 'Extract',
      name: 'Extract'
    }
    Failed Installing Extensions: file:///opt/homebrew/lib/node_modules/%40anthropic-ai/claude-code/vendor/claude-code.vsix
    (node:6881) [DEP0168] DeprecationWarning: Uncaught N-API callback exception detected, please run node with option
    --force-node-api-uncaught-exceptions-policy=true to handle those exceptions properly.
    (Use `Cursor --trace-deprecation ...` to show where the warning was created)

    Please restart your IDE and try again.


mikey@Mikeys-MacBook-Pro Web Dev % claude -v
1.0.53 (Claude Code)

zanhk · 11 months ago

Same experiencing the same problem with version 1.0.60

Manual installation does not fix

mrmachine · 11 months ago

Same problem here on VSCode Insiders... no problem on VSCode... echo $TERM_PROGRAM reports vscode for both, but VSCode Insiders does not resolve which code (only which code-insiders).

github-actions[bot] · 11 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.