[BUG] Extension fails to activate: "TypeError: Invalid value for env" (command 'claude-vscode.editor.openLast' not found)

Status Fixed / completed
Maintainer reply None cached
Activity 2 comments · opened Jul 16, 2026 · closed Jul 16, 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?

When launching VS Code with the Claude Code VS Code extension installed, the extension completely fails to activate. Trying to interact with the extension displays the error: command 'claude-vscode.editor.openLast' not found.

Upon inspecting the VS Code Developer Tools console, the actual root cause is that the VS Code Extension Host process crashes immediately during startup with a TypeError: Invalid value for env coming from Electron's internal utility process initialization.

Steps to reproduce:

  1. Install the Claude Code extension on VS Code (Windows).
  2. Launch VS Code.
  3. Try to open or use Claude.
  4. Error appears: command 'claude-vscode.editor.openLast' not found.

What Should Happen?

The VS Code Extension Host should start successfully, allowing the Claude extension to register its commands and activate normally so I can use the extension.

Error Messages/Logs

ERR Error received from starting extension host (kind: LocalProcess)
ERR TypeError: Invalid value for env
    at new ForkUtilityProcess (node:electron/js2c/browser_init:2:84047)
    at Object.fork (node:electron/js2c/browser_init:2:82259)
    at fs.doStart (file:///C:/Users/R****/AppData/Local/Programs/Microsoft VS Code/resources/app/out/main.js:450:12544)
    at fs.start (file:///C:/Users/R****/AppData/Local/Programs/Microsoft VS Code/resources/app/out/main.js:450:15813)

Steps to Reproduce

When launching VS Code with the Claude Code VS Code extension installed, the extension completely fails to activate. Trying to interact with the extension displays the error: command 'claude-vscode.editor.openLast' not found.

Upon inspecting the VS Code Developer Tools console, the actual root cause is that the VS Code Extension Host process crashes immediately during startup with a TypeError: Invalid value for env coming from Electron's internal utility process initialization.

Steps to reproduce:

  1. Install the Claude Code extension on VS Code (Windows).
  2. Launch VS Code.
  3. Try to open or use Claude.
  4. Error appears: command 'claude-vscode.editor.openLast' not found.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Latest VS Code Extension

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

The issue persists even after:

  • Reinstalling the extension and VS Code completely.
  • Downgrading the extension.
  • Trying both User and System installers of VS Code.

The crash happens within the VS Code Extension Host process itself (TypeError: Invalid value for env), which blocks all extensions from running.

<img width="2026" height="1368" alt="Image" src="https://github.com/user-attachments/assets/ca5679e0-76fe-4dd0-aca5-c21a412a0a4e" />

View original on GitHub ↗

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