[Copilot Sessions] Claude Code CLI sessions incorrectly marked as "Failed" after successful completion

Open
#319,043 0 comments 0 reactions 1 assignee View on GitHub

@TylerLeonhardt is already working on this.

Since May 29, 2026.

Assessment

This issue has not been assessed yet.

Description

Does this issue occur when all extensions are disabled?: No
(Requires GitHub Copilot and Claude Code CLI extensions)

  • VS Code Version: 1.122.1
  • OS Version: Windows 10 Pro 10.0.19045
  • GitHub Copilot Extension Version: 0.50.1
  • Claude Code CLI Version: 2.1.112

Steps to Reproduce

  1. Open a workspace in VS Code with GitHub Copilot and Claude Code CLI installed.
  2. Start a new Claude Code session via the Copilot Sessions panel ("New" button).
  3. Have a normal conversation with Claude Code — ask it to read files, answer questions, or write code.
  4. Wait for Claude Code to complete its response (the CLI process exits normally).
  5. Observe the session status in the Copilot Sessions panel.

Expected Behavior

Completed sessions should be marked as "Completed" (or similar) when the Claude Code CLI process exits with a successful status (stop_reason: end_turn).

Actual Behavior

All sessions are marked as "Failed" in the Copilot Sessions panel, regardless of whether the underlying Claude Code CLI process completed successfully. The chat UI also intermittently displays an "Error during execution" block when individual tool calls inside Claude Code fail and recover — this is normal recoverable behavior in Claude Code, but it is surfaced to the user as a top-level failure.

Root Cause (Investigated)

Inspecting the Claude Code session logs (~/.claude/projects/<workspace>/<sessionId>.jsonl), every session ends with:

{ "stop_reason": "end_turn" }
Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.