[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
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

  1. Open VS Code 1.128.0 (which includes Copilot as a built-in extension)
  2. Have Claude Code extension installed (v2.1.207)
  3. Open Copilot Chat
  4. Invoke @claude with 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).

View original on GitHub ↗

5 Comments

ksullivan-dev · 1 month ago

Update: DevTools console confirms this is the same root cause as #73013.

ERR CodeExpectedError: ENOPRO: No file system provider found for resource 'claude-code:/agents/.claude%3Apr-monitor'
    at jle.withProvider (fileService.ts:150:1)
    at async jle.withReadProvider (fileService.ts:160:1)
    at async jle.readFile (fileService.ts:541:1)
    at async jLe.parseNew (promptsServiceImpl.ts:711:1)
    at async bht.getCustomAgents (customizationHarnessService.ts:613:1)
    at async wfe.refreshCustomPromptModes (chatModes.ts:246:1)

The extension registers agents under the claude-code:// URI scheme but does not provide a FileSystemProvider for that scheme. VS Code's chatModes subsystem tries to read the agent definition via readFile, gets ENOPRO, and the entire agent registration fails — crashing the @claude agent 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).

ksullivan-dev · 1 month ago

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:

ENOPRO: No file system provider found for resource 'claude-code:/agents/Explore'

Explore is 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 via readFile on claude-code:/agents/<name> URIs. No FileSystemProvider is registered for the claude-code: scheme, so every agent read fails with ENOPRO.

What was tried without success:

  • VS Code rollback to 1.126.0
  • Claude Code extension rollback to 2.0.9
  • Removing all .claude/skills/ directories from open workspaces
  • Removing .claude/agents/pr-monitor.md from workspace

Conclusion: 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:

  1. The Claude Code extension registering a FileSystemProvider for the claude-code: URI scheme, or
  2. VS Code's customizationHarnessService handling 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).

ksullivan-dev · 1 month ago

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:

  • No sidebar session history / active chat list
  • No side-by-side conversation layout (user input left, response right)
  • Repo switching is command-driven rather than dropdown-based
  • The terminal-in-webview UX is significantly worse for conversational workflows

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).

ksullivan-dev · 1 month ago

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-chat aside, 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 ENOPRO crash 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.getCustomAgentspromptsServiceImpl.parseNewfileService.readFile) is addressing an existing agent via the virtual claude-code: scheme, for which no FileSystemProvider is 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).

ksullivan-dev · 1 month ago

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-chat cache:

| 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:

  • "Claude" (Claude Code agent) delegation fails with ENOPRO reproducibly on both 1.126.0 and 1.128.1, on clean caches.
  • The error is on a built-in agent (Explore), so it's not workspace/config specific.
  • "Local" delegation works but routes through Copilot billing — not an equivalent path for users who need the Claude Code / VertexAI (BYO) route.
  • The Claude Code extension's own panel is unaffected and works fine; only the in-chat "Claude" delegation is broken.

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 no FileSystemProvider is registered for the claude-code: scheme when the chat harness reads it:

chatModes.refreshCustomPromptModes
  → customizationHarnessService.getCustomAgents
    → promptsServiceImpl.parseNew
      → fileService.readFile('claude-code:/agents/Explore')  → ENOPRO

Apologies for the earlier noise.

Comment added by Claude Code (AI coding assistant).