[BUG] Extension host crashes on load in GitHub Codespaces — PendingMigrationError: navigator is now a global in nodejs (v2.1.208 and v2.1.209)
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?
The Claude Code VS Code extension crashes the remote extension host at load time inside a GitHub Codespace. VS Code shows:
Remote Extension host terminated unexpectedly 3 times within the last 5 minutes.
The Extension Host (Remote) output log throws PendingMigrationError: navigator is now a global in nodejs on every extension load. The stack trace originates entirely inside the bundled anthropic.claude-code extension while its Zod schemas are being constructed at module require time — the same navigator-as-global collision reported in #21877 and #65440.
Updating from 2.1.208 to 2.1.209 did not fix it — 2.1.209 crashes with an identical stack trace (same file offsets), so the routine version bump does not contain a fix for this issue.
What Should Happen?
The extension should activate cleanly in a GitHub Codespace without throwing PendingMigrationError, and the remote extension host should remain stable.
Notes
Node.js 20+ makes navigator a built-in read-only global. The extension appears to reference navigator (likely a typeof navigator environment check) during Zod schema construction at module load, which now throws under the extension host's Node runtime.
This takes down the entire remote extension host, so git, GitHub, and the TypeScript language server are also disrupted, not just Claude Code.
Workaround: disabling the extension and running the claude CLI in the integrated terminal is unaffected, since the CLI runs outside VS Code's extension-host guard.
Error Messages/Logs
[error] PendingMigrationError: navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.
at get (file:///vscode/bin/linux-x64/4fe60c8b1cdac1c4c174f2fb180d0d758272d713/out/vs/workbench/api/node/extensionHostProcess.js:852:7288)
at /home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:17:23154
at Object.get value [as value] (/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:17:17284)
at /home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:43:198
at $ZodObject.n (/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:17:15025)
at /home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:45:19691
at n (/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:17:15025)
at new ZodObject (/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:17:15289)
at Xn (/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:45:9980)
at Object.<anonymous> (/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/extension.js:317:8416)
at Module._compile (node:internal/modules/cjs/loader:1830:14)
at Module.load (node:internal/modules/cjs/loader:1553:32)
at Module.require (node:internal/modules/cjs/loader:1576:12)
at require (node:internal/modules/helpers:153:16)
...
Steps to Reproduce
Open a GitHub Codespace with the Claude Code extension enabled.
Let the extension host activate (or run Developer: Reload Window).
Observe the "Remote Extension host terminated unexpectedly 3 times within the last 5 minutes" banner.
Open OUTPUT → Extension Host (Remote) and observe the PendingMigrationError
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.209
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment
Extension version: anthropic.claude-code 2.1.208, then auto-updated to 2.1.209 — both crash
Host: GitHub Codespaces (remote extension host, linux-x64)
Extension path: /home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.209-linux-x64/
VS Code Server build: 4fe60c8b1cdac1c4c174f2fb180d0d758272d713
VS Code version: <fill in — Help → About, or the Codespaces client version>
Extension host Node.js version: <fill in — run node -v in a terminal, and note the extension host may use a different bundled Node>
Reproducible: Yes — every extension load / window reload