[BUG] Claude code VS Code extension error in MacOS

Resolved 💬 4 comments Opened Mar 15, 2026 by get2rayan Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Extension Claude code for VS Code latest version 2.1.76 in MacOs gives error
IDE: ✘ Error installing VS Code extension: 1: Command failed with
ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension
anthropic.claude-code
Premature close
Please restart your IDE and try again.

<img width="984" height="428" alt="Image" src="https://github.com/user-attachments/assets/599f8b8c-3e7a-4661-b405-21bb15ccc292" />

What Should Happen?

Claude code should run without the aforementioned error message

Error Messages/Logs

IDE: ✘ Error installing VS Code extension: 1: Command failed with
       ERR_STREAM_PREMATURE_CLOSE: code --force --install-extension
       anthropic.claude-code
       Premature close
       Please restart your IDE and try again.

Steps to Reproduce

Install latest claude code extension in VS Code in MacOs (Sequoia 15.7.3) and run claude

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="984" height="428" alt="Image" src="https://github.com/user-attachments/assets/599f8b8c-3e7a-4661-b405-21bb15ccc292" />

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗