[BUG] Subprocess initialization timeout (60s) on VSCode 1.123.0 with Node.js v24 — PendingMigrationError: navigator is now a global

Resolved 💬 2 comments Opened Jun 4, 2026 by michalwidera Closed Jun 7, 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?

Environment

Claude Code extension: 2.1.162
VSCode: 1.123.0 (stable)
VSCode Server Node.js: v24.15.0
OS: Ubuntu 24.x on WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
Platform: linux/x64

Description

On VSCode 1.123.0, which ships with Node.js v24.15.0, the Claude Code extension frequently fails to start with:

Error: Subprocess initialization did not complete within 60000ms
— check authentication and network connectivity
The extension host log (remoteexthost.log) shows three PendingMigrationError exceptions at every extension load, caused by the extension accessing navigator global during module initialization:

PendingMigrationError: navigator is now a global in nodejs,
please see https://aka.ms/vscode-extensions/navigator

at Object.<anonymous> (extension.js:82:12292) ← top-level module code
at $ZodObject.N (extension.js:168:70464) ← Zod schema init
at Object.<anonymous> (extension.js:196:25854)
...
The errors occur in Zod schema definitions that run at module load time, indicating that browser-environment detection (typeof navigator === 'undefined') is broken under Node.js v24, where navigator is now a global. This causes the extension to initialize with corrupted internal state, resulting in a race condition: the subprocess sends the system/init ready signal on stdout within ~3 seconds, but the extension's stdout handler is sometimes not properly set up, so the signal is never received and the 60-second timeout fires.

Observed pattern: first launch after VSCode restart fails with the timeout; a second attempt in the same VSCode session usually succeeds immediately, suggesting warm state from the failed attempt.

Reproduction steps

Install VSCode 1.123.0 (ships with Node.js v24.15.0 in the extension host)
Open a WSL2 remote window
Open the Claude Code panel — observe 60-second hang followed by timeout error
Check the extension host log for PendingMigrationError: navigator is now a global

Evidence: subprocess itself is healthy

Running the subprocess directly from a terminal (with the exact flags and environment variables the extension uses) always returns system/init within 3 seconds:

$ time (echo '{"type":"user","message":{"role":"user","content":"ping"},"session_id":"test"}' | \
ELECTRON_RUN_AS_NODE=1 CLAUDE_CODE_ENTRYPOINT=claude-vscode \
MCP_CONNECTION_NONBLOCKING=true \
claude --output-format stream-json --input-format stream-json \
--permission-prompt-tool stdio --setting-sources=user,project,local \
--permission-mode acceptEdits --enable-auth-status --no-chrome \
--replay-user-messages 2>/dev/null | head -1)

{"type":"system","subtype":"init",...}

real 0m2.9s

The problem is not network connectivity or authentication — it is a compatibility issue between extension.js and Node.js v24.

Expected behavior

Extension initializes successfully on first attempt regardless of VSCode / Node.js version.

Suggested fix

Replace top-level typeof navigator === 'undefined' checks (used for Node.js vs. browser environment detection, particularly in Zod schema initialization) with checks that are safe in Node.js v24, e.g.:

// instead of:
typeof navigator === 'undefined'

// use:
typeof process !== 'undefined' && process.versions?.node != null
See: https://aka.ms/vscode-extensions/navigator

What Should Happen?

VSCode extenstion should start without timeout 60000ms

Error Messages/Logs

Timeout 60000ms

Steps to Reproduce

Reproduction steps
Install VSCode 1.123.0 (ships with Node.js v24.15.0 in the extension host)
Open a WSL2 remote window
Open the Claude Code panel — observe 60-second hang followed by timeout error
Check the extension host log for PendingMigrationError: navigator is now a global

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.162

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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