Home / Blog / Pricing

Pricing

GitHub Copilot "Error during execution" with the Claude Agent: Causes and Fixes

Copilot Chat's Claude agent stops with "Error during execution"? What the VS Code issues say causes it, the fixes, and when to switch agents instead.

9 min read

Error text, versions and fix statements checked Nov 9, 2026 in Microsoft’s VS Code repo: #325711, #322888 and #324917. Harness and billing behavior checked Nov 9, 2026 in VS Code’s agent harness docs and GitHub’s Copilot plans docs. Every source is listed at the bottom. No affiliate links on this page (how we work).

The exact error: Error during execution

This is the line that shows up when the Claude agent dies inside Copilot Chat in VS Code:

Error: Error during execution

Short answer: it’s the Claude agent run failing inside Copilot Chat, not your prompt and not your Copilot plan. Every report I could find ties it to the Claude agent path (the one built on Anthropic’s Claude Agent SDK), and the most-cited bug was fixed in VS Code 1.133.0, according to a VS Code team member on #325711 (verified Nov 9, 2026). So step one is boring and effective: update VS Code.

Step two, if updating doesn’t fix it, depends on how you’ve set Claude up. That’s what the rest of this page sorts out.

The annoying part is how little the message tells you. In the original report, the model call itself succeeded. The logs show a clean success line from Claude, then the agent loop stops, then Error during execution. The model did its job; the plumbing around it fell over. Bill & Ted would call it right: “Strange things are afoot at the Circle K.”

Cause 1: an older VS Code build with the old Claude session code

The main issue, #325711, was opened on Jul 13, 2026 with this setup, quoted from the issue:

  • VS Code 1.127.0, Electron 42.2.0 (Node ~24.x)
  • Copilot extension 0.55.0
  • Bundled Claude Code CLI 2.1.112
  • macOS (arm64)

The reporter wrote that “Regular GitHub Copilot Chat/Agent (e.g. GPT-4o-mini or other claude models) works fine. The issue is specific to the ClaudeCodeSession agent SDK path.” Their theory was a Node 24 module warning that “may cause the subprocess to report an error status despite successful completion.” That’s a theory from the reporter, not a confirmed root cause.

Another commenter hit the same crash on VS Code 1.128.0 and found a different error hiding underneath. Opening Help > Toggle Developer Tools showed this in the console:

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

That same commenter later corrected their own notes: the crash happened on both 1.126.0 and 1.128.1 with a fresh cache, so it wasn’t a single-version regression, and clearing the cache didn’t fix it.

What actually closed it was a VS Code team comment on Oct 12, 2026: the old extension-host ClaudeCodeSession implementation “was removed”, Agent Host became “the sole Claude sessions implementation”, and “The fix shipped in 1.133.0.” The issue was closed that day.

What that means for you: if you’re on anything older than VS Code 1.133.0 and see Error during execution with the Claude agent, you’re very likely on the code path that no longer exists.

Cause 2: Claude Code configured through Amazon Bedrock

The second issue, #322888, opened Jun 25, 2026, is the enterprise version of the same pain. The setup: Claude Code is configured to use Anthropic models through Amazon Bedrock, works fine on its own, then fails with Error during execution the moment you use it as the Claude agent in Copilot Chat. The reporter saw it on VS Code 1.126.0, on both native Windows 11 and WSL.

A commenter narrowed it down. With Bedrock settings in ~/.claude/settings.json, including "CLAUDE_CODE_USE_BEDROCK": "1", the agent failed. Their words: “I confirmed the issue only comes up when CLAUDE_CODE_USE_BEDROCK is set to 1. If i set to 0, I do get the response.”

Read the next line before you flip that switch: “Seems when CLAUDE_CODE_USE_BEDROCK is set to 0 it instead switches to Copilot subscription.” So setting it to 0 doesn’t fix Bedrock. It stops using Bedrock. If your company routes Claude through Bedrock for billing or compliance reasons, that’s not a workaround, it’s a policy problem with extra steps.

The issue was closed as completed on Oct 16, 2026, after a user posted: “Not an issue anymore. Works in Version >= 1.139.0”. No VS Code team member posted a fix note on that one, so treat 1.139.0 as one user’s report, not an official fix version.

Cause 3: other third-party Claude integration bugs

The third issue, #324917, opened Jul 8, 2026 and still open on Nov 9, 2026, reads like a bad day in four acts. On VS Code 1.127.0 with only a Copilot subscription (no separate Anthropic account), the reporter hit:

  1. Requests stuck on “Evaluating” or “Analyzing” with no error.
  2. A 400: "thinking.type.enabled" is not supported for this model.
  3. Then Error: Error during execution, “while the same prompts worked fine with GPT-based models.”
  4. Chat history lost when reopening Claude sessions.

The reporter’s fix for the 400 was turning on three Agent Host settings: chat.agentHost.enabled, chat.editor.claude.preferAgentHost and chat.agents.claude.preferAgentHost. Two caveats, both from the issue: that change fixed only the 400, and it “caused all pre-existing chat sessions to be invalidated.” The only reply so far is a bot asking the reporter to upgrade from 1.127.0.

Connect this to Cause 1: on Oct 12, 2026 the VS Code team said Agent Host is the only Claude sessions implementation as of 1.133.0. So on 1.133.0 or later, the old preferAgentHost toggles are describing a choice that’s already been made for you.

Fixes, in order

Every step here comes from the issues above or VS Code’s own docs. Nothing invented, no hacks.

  1. Update VS Code. Run Code: Check for Updates. The VS Code team says the fix for the main crash shipped in 1.133.0 (#325711, verified Nov 9, 2026). The Bedrock reporter’s thread ends with “Works in Version >= 1.139.0” (#322888).
  2. Check which harness you’re actually on. VS Code’s harness docs (verified Nov 9, 2026) say the active harness shows as a prefix in the chat title. Claude is its own harness built on the Claude Agent SDK. Picking a Claude model in the Copilot harness “still uses the Copilot harness.”
  3. Switch to the Copilot harness to keep working. Open the Session Target control in a new chat and pick Copilot, then choose a Claude model. In #325711, “other claude models” through regular Copilot Chat worked while the Claude agent path crashed. VS Code’s own advice: “Start with the Copilot harness for day-to-day coding and agent tasks.”
  4. If you use Bedrock, check ~/.claude/settings.json. Confirm what CLAUDE_CODE_USE_BEDROCK is set to and know the trade-off from #322888: 1 used Bedrock and failed on that older build; 0 worked by switching to your Copilot subscription.
  5. Read the real error. Open Help > Toggle Developer Tools and look in the console, as the #325711 commenter did. Set Developer: Set Log Level to Trace and check the GitHub Copilot Chat output channel (VS Code troubleshooting docs, verified Nov 3, 2026). Bring that log if you file an issue.
  6. If the Claude option is missing entirely, that’s a different problem. VS Code’s docs say “Claude and Codex harnesses are disabled when Copilot enterprise-managed settings apply.” Ask whoever manages your org’s VS Code settings.

Bartlet would have said it by now: “What’s next?” If all six fail on VS Code 1.133.0 or later, file a fresh issue with the log. Two of the three issues above are closed, and the third had only a bot reply as of Nov 9, 2026.

Does it cost you anything?

GitHub doesn’t say whether a run that ends in Error during execution uses AI credits. Here’s what is documented:

  • When the Claude harness uses Copilot-routed models, “Usage is billed through your Copilot subscription” (VS Code harness docs, verified Nov 9, 2026). With your own key, “Usage is billed by your configured provider.”
  • Third-party coding agents are billed in AI credits (individual billing docs, verified Nov 4, 2026).
  • “Third-party Agents (public preview)” is Not included on Copilot Free and Copilot Student, and included on Pro, Pro+, Max, Business and Enterprise (plans docs, verified Nov 9, 2026).

So if a run errors out after the model already answered, as in #325711’s logs, some usage may have happened. Check your Copilot usage dashboard, not this page, for the real number.

Other Copilot errors that look similar

Here’s what I’d do

I haven’t run into this one myself. This is a read of the three VS Code issues and VS Code’s docs. Here’s my order. Update VS Code first, since one version bump fixed the main bug, and that’s the whole fix for most people. If I needed Claude right away and the agent kept failing, I’d switch the session to the Copilot harness and pick a Claude model there. Same model family, different plumbing.

If my company had wired Claude Code through Bedrock, I wouldn’t flip CLAUDE_CODE_USE_BEDROCK to 0 to make the error go away. That quietly moves billing to Copilot, and somebody in finance will find out eventually.

And if Claude agent sessions are the reason I’m in Copilot at all, I’d ask whether running Claude Code directly makes more sense. It cuts out a layer that keeps breaking. GitHub Copilot vs Claude Code lays out that trade-off, and Claude Code pricing has the current plan prices. Still shopping? See GitHub Copilot alternatives and AI coding tools compared.

FAQ

What does Error during execution mean in GitHub Copilot? It means the Claude agent run failed inside Copilot Chat in VS Code; in Microsoft’s issue #325711 the model call succeeded and the agent’s post-processing threw Error during execution.

Why does the Claude agent fail in Copilot Chat? VS Code issues tie it to the old ClaudeCodeSession code path, which the VS Code team says was removed with the fix in VS Code 1.133.0, and to Claude Code set up through Amazon Bedrock.

How do I fix Error during execution in VS Code? Update VS Code to 1.133.0 or later, check the harness in the chat title, switch to the Copilot harness with a Claude model if it persists, and read the Developer Tools console for the real error.

Does Error during execution use up my Copilot credits? GitHub doesn’t say; Copilot-routed Claude harness usage is billed through your Copilot subscription, so check your usage dashboard after a failed run.

Does setting CLAUDE_CODE_USE_BEDROCK to 0 fix it? In issue #322888 it made the response work, but the commenter said it did so by switching to the Copilot subscription instead of Bedrock.

Can I use the Claude agent on Copilot Free? GitHub’s plans docs list Third-party Agents (public preview) as Not included on Copilot Free and Copilot Student, checked Nov 9, 2026.

Sources

  1. Microsoft VS Code GitHub issue #325711, “Claude agent SDK crashes with “Error during execution” in Copilot Chat (VS Code 1.127.0, Electron 42 / Node 24)”: https://github.com/microsoft/vscode/issues/325711 (verified 2026-11-09)
  2. Microsoft VS Code GitHub issue #322888, “Claude Agent fails with “Error during execution” when Claude Code is configured via Amazon Bedrock”: https://github.com/microsoft/vscode/issues/322888 (verified 2026-11-09)
  3. Microsoft VS Code GitHub issue #324917, “GitHub Copilot Chat – Multiple bugs with third-party Claude model integration (VS Code)”: https://github.com/microsoft/vscode/issues/324917 (verified 2026-11-09)
  4. VS Code docs, Choose an agent harness (Claude harness, billing, enterprise-managed settings): https://code.visualstudio.com/docs/copilot/agents/third-party-agents (verified 2026-11-09)
  5. VS Code docs, Troubleshoot AI in Visual Studio Code (updates, logs): https://code.visualstudio.com/docs/copilot/troubleshooting (verified 2026-11-03)
  6. GitHub Docs, Plans for GitHub Copilot (Third-party Agents by plan): https://docs.github.com/en/copilot/get-started/plans (verified 2026-11-09)
  7. GitHub Docs, Usage-based billing for individuals (what uses AI credits): https://docs.github.com/en/copilot/concepts/billing-and-usage/individuals/billing (verified 2026-11-04)

Related reading