[BUG] Claude agent crashes in Copilot Chat with "Error during execution" (VS Code 1.128.0 built-in Copilot, Node 24)
Status Open
Reported on v2.1.207
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Jul 13, 2026
Description
Using @claude in VS Code's built-in Copilot Chat crashes with Error during execution. The crash occurs immediately after [ClaudeCodeSession] Passing 64 plugin(s) from skill locations, suggesting the failure is in the agent handshake/plugin registration phase.
Basic Copilot Chat requests (e.g. gpt-4o-mini) succeed — only the Claude agent integration fails.
Steps to Reproduce
- Open VS Code 1.128.0 (which includes Copilot as a built-in extension)
- Have Claude Code extension installed (v2.1.207)
- Open Copilot Chat
- Invoke
@claudewith any prompt
Expected Behavior
Claude agent responds in Copilot Chat.
Actual Behavior
Crash with Error during execution. A MODULE_TYPELESS_PACKAGE_JSON warning about ESM reparsing appears on stderr immediately before the error, which may be related — Node 24 tightened module type resolution.
Logs
From GitHub Copilot Chat output channel:
2026-07-13 11:43:34.133 [info] [ClaudeCodeSession] Passing 64 plugin(s) from skill locations
2026-07-13 11:43:34.601 [error] claude-agent-sdk stderr: (node:23795) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/copilot/dist/cli.js is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/copilot/package.json.
(Use `Code Helper (Plugin) --trace-warnings ...` to show where the warning was created)
2026-07-13 11:43:36.231 [error] Error: Error during execution
at cUo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/copilot/dist/extension.js:2908:480)
at iyr (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/copilot/dist/extension.js:2908:692)
at n.invokeFunction (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/copilot/dist/extension.js:29:944)
at uV._processMessages (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/copilot/dist/extension.js:2915:17124)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
Environment
- VS Code: 1.128.0 (Universal)
- Electron: 42.5.0
- Node.js: 24.17.0
- OS: macOS Darwin arm64 25.5.0
- Claude Code extension: 2.1.207
- Copilot: Built-in (no separate extension installed)
---
This issue was drafted with the help of Claude Code (AI coding assistant).
5 Comments
Update: DevTools console confirms this is the same root cause as #73013.
The extension registers agents under the
claude-code://URI scheme but does not provide aFileSystemProviderfor that scheme. VS Code'schatModessubsystem tries to read the agent definition viareadFile, getsENOPRO, and the entire agent registration fails — crashing the@claudeagent in Copilot Chat sidebar.This reproduces on VS Code 1.128.0 (built-in Copilot, no separate Copilot extension), Claude Code 2.1.207, macOS arm64.
Comment added by Claude Code (AI coding assistant).
Further investigation — built-in agent types are the root cause, not workspace skills
After extensive debugging (renaming workspace skills, removing
.claude/agents/pr-monitor.md, testing different extension and VS Code versions), the root cause is now clear:The error is NOT caused by workspace-specific skill or agent files. After removing all workspace agent definitions, the error simply moved to the next registered agent:
Exploreis a built-in Claude Code agent type — not defined in any workspace file. The extension registers its own built-in agent types (Explore,general-purpose,pr-monitor, etc.) via$onDidChangeCustomizations, and VS Code's chat system (customizationHarnessService.ts) tries to read their definitions viareadFileonclaude-code:/agents/<name>URIs. NoFileSystemProvideris registered for theclaude-code:scheme, so every agent read fails withENOPRO.What was tried without success:
.claude/skills/directories from open workspaces.claude/agents/pr-monitor.mdfrom workspaceConclusion: This is a fundamental issue in how the extension registers built-in agent types with VS Code's Copilot agent harness. The fix requires either:
FileSystemProviderfor theclaude-code:URI scheme, orcustomizationHarnessServicehandling missing providers more gracefully (not failing the entire agent session)This affects all windows regardless of workspace state, and is not configurable by users.
Comment added by Claude Code (AI coding assistant).
Impact note — no viable workaround for enterprise VertexAI users
For users on enterprise VertexAI setups (HIPAA-compliant, org-managed), the Claude Code extension panel is the only remaining option, but it's not a viable substitute for the Copilot Chat Delegate Sessions UI:
The Copilot Chat model picker (selecting Claude as a model) is not a workaround either — it routes billing through GitHub instead of VertexAI, which doesn't meet compliance requirements.
This leaves enterprise VertexAI users with zero workaround that matches their previous workflow. Prioritization signal: this user's team had a working Delegate Sessions → Claude workflow for 6+ weeks before this broke.
Comment added by Claude Code (AI coding assistant).
Version bisection — this is a VS Code 1.127+ regression, not a cache issue
Ran a controlled comparison with cache state held constant (fully quit VS Code, moved
~/Library/Application Support/Code/User/globalStorage/github.copilot-chataside, relaunched to rebuild a clean cache):| VS Code | Cache | Result |
|---------|-------|--------|
| 1.126.0 | cleared/fresh | ✅ Delegate → Claude works |
| 1.128.1 | cleared/fresh | ❌
ENOPRO: No file system provider found for resource 'claude-code:/agents/Explore'|Same clean-cache procedure both times, so the cache is ruled out as the variable. The only difference is the VS Code version.
Additionally, #325711 reports the identical
ENOPROcrash independently on 1.127.0, which places the regression in the 1.126 → 1.127 window.Notable detail: the agent file the error references physically exists on disk (
globalStorage/github.copilot-chat/explore-agent/Explore.agent.md). So this is not missing/corrupt data — VS Code's chat customization harness (customizationHarnessService.getCustomAgents→promptsServiceImpl.parseNew→fileService.readFile) is addressing an existing agent via the virtualclaude-code:scheme, for which noFileSystemProvideris registered at read time. This suggests either a provider-registration regression or a startup ordering/race introduced in 1.127.Workaround for affected users: pin VS Code to 1.126.0 and disable auto-update (
"update.mode": "manual").Comment added by Claude Code (AI coding assistant).
Correction — retracting my earlier version bisection.
My previous comments were wrong and I want to correct the record before they mislead anyone.
The earlier claim that "VS Code 1.126.0 with a clean cache works" was a misattribution: that particular success was the "Local" agent-delegation option, not "Claude". Re-tested carefully selecting "Claude" specifically, each time on a freshly-cleared
github.copilot-chatcache:| VS Code | Cache | "Claude" delegation |
|---------|-------|---------------------|
| 1.126.0 | cleared/fresh | ❌
ENOPRO … 'claude-code:/agents/Explore'|| 1.128.1 | cleared/fresh | ❌
ENOPRO … 'claude-code:/agents/Explore'|So this is NOT a 1.126→1.127 regression, and clearing the cache does not fix it. Please disregard my earlier bisection table.
Context: "Claude" delegation worked reliably for this user for ~6 weeks and broke recently (around mid-July 2026). Notably, rolling VS Code back to 1.126.0 and clearing the cache does not restore it — so whatever changed is not fixed by reverting the VS Code version alone.
Corrected summary:
Explore), so it's not workspace/config specific.Still-valid root-cause detail: the agent file physically exists on disk (
globalStorage/github.copilot-chat/explore-agent/Explore.agent.md); the failure is that noFileSystemProvideris registered for theclaude-code:scheme when the chat harness reads it:Apologies for the earlier noise.
Comment added by Claude Code (AI coding assistant).