Windows activation failure: createRequire invalid file URL breaks command registration in 2.1.51-2.1.53
Resolved 💬 5 comments Opened Feb 25, 2026 by dYogesh21 Closed Feb 25, 2026
Claude VS Code Extension Activation Failure on Windows
Report Summary
- Product:
Anthropic.claude-codeVS Code extension - Platform: Windows 11 (x64)
- IDE: VS Code
1.109.5(072586267e68ece9a47aa43f8c108e0dcbf44622) - Symptom: Claude commands unavailable (
command 'claude-vscode.editor.openLast' not found) and Claude panel fails to open reliably - Root failure observed in logs: extension activation crash due to invalid
createRequire()input path
Impact
- Claude extension fails during activation on startup in affected versions.
- Commands contributed by the extension are not registered.
- User cannot use Claude panel/workflows in affected versions.
- Reinstalling affected versions does not resolve the issue.
Timeline (UTC+05:30 local system time)
- February 24, 2026 ~11:43: Failure observed with
2.1.51activation. - February 24, 2026 ~12:32: Updated to
2.1.52, same failure pattern. - February 25, 2026 ~06:23: Updated to
2.1.53, same failure pattern. - February 25, 2026 ~07:18: Rolled back to
2.1.49; issue resolved and extension operates normally.
Current Working State
- Installed version now:
anthropic.claude-code@2.1.49 - Verified command output:
code --list-extensions --show-versionsshowsanthropic.claude-code@2.1.49
Reproduction Steps
- Use Windows 11 + VS Code
1.109.5. - Install/upgrade Claude extension to
2.1.51,2.1.52, or2.1.53. - Restart VS Code and open Claude command (
Claude Code: Open/openLast). - Observe command missing errors and activation failure in extension host log.
Expected vs Actual
- Expected:
- Extension activates on startup.
claude-vscode.editor.openLastand related commands are registered and executable.- Actual:
- Activation throws
TypeErrorbefore command registration. - VS Code reports command not found and Claude workflows fail.
Key Evidence (Log Excerpts)
1) Activation failure on 2.1.53
File: C:\Users\yoges\AppData\Roaming\Code\logs\20260225T062110\window2\exthost\exthost.log
396: 2026-02-25 06:23:24.337 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
397: 2026-02-25 06:23:24.435 [error] Activating extension Anthropic.claude-code failed due to an error:
398: 2026-02-25 06:23:24.436 [error] TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs'
399: at Module.createRequire (node:internal/modules/cjs/loader:1915:13)
400: at Object.<anonymous> (c:\Users\yoges\.vscode\extensions\anthropic.claude-code-2.1.53-win32-x64\extension.js:45:4882)
2) Same failure pattern on 2.1.51
File: C:\Users\yoges\AppData\Roaming\Code\logs\20260224T114302\window1\exthost\exthost.log
37: 2026-02-24 11:43:28.871 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
38: 2026-02-24 11:43:28.954 [error] Activating extension Anthropic.claude-code failed due to an error:
39: 2026-02-24 11:43:28.954 [error] TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs'
41: at Object.<anonymous> (c:\Users\yoges\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)
3) Version transition evidence (2.1.51 -> 2.1.52)
File: C:\Users\yoges\AppData\Roaming\Code\logs\20260224T114336\sharedprocess.log
1: 2026-02-24 12:14:01.992 [info] Uninstalling extension from the profile: anthropic.claude-code@2.1.51
11: 2026-02-24 12:32:28.824 [info] Extracted extension to ... anthropic.claude-code-2.1.52-win32-x64
12: 2026-02-24 12:32:28.832 [info] Renamed to c:\Users\yoges\.vscode\extensions\anthropic.claude-code-2.1.52-win32-x64
14: 2026-02-24 12:32:28.885 [info] Extension installed successfully: anthropic.claude-code
4) UI symptom (secondary)
File: C:\Users\yoges\AppData\Roaming\Code\logs\20260225T062110\window2\renderer.log
125: 2026-02-25 06:24:58.787 [error] TreeError [DebugRepl] Tree input not set: Error: TreeError [DebugRepl] Tree input not set
The primary blocker is the extension host activation exception shown above.
Why reinstall did not help
- Reinstall/upgrade cycles succeeded at installer level, but runtime activation still fails with the same exception.
- This suggests the issue is in shipped extension runtime logic for affected versions, not local installation corruption.
Workaround that fixed it
- Reverted extension to
2.1.49. - After rollback, extension activates and Claude workflow is usable again.
Suspected Root Cause
- A runtime path string appears to reference a build-time Linux path:
file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs- In affected versions, this path is passed into
Module.createRequire(...)during activation on Windows, causing immediate failure.
Vendor Request
Please investigate and provide:
- A fix for Windows activation in versions after
2.1.49. - Confirmation whether this is a packaging/build artifact path leak.
- A patched release or guidance for safe upgrade from
2.1.49. - Any additional diagnostics needed; raw logs can be provided on request.
Environment Snapshot
- OS: Windows 11 x64
- VS Code:
1.109.5 - Claude extension affected:
2.1.51,2.1.52,2.1.53 - Claude extension working:
2.1.49
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗