[Copilot Sessions] Claude Code CLI sessions incorrectly marked as "Failed" after successful completion
@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
- Open a workspace in VS Code with GitHub Copilot and Claude Code CLI installed.
- Start a new Claude Code session via the Copilot Sessions panel ("New" button).
- Have a normal conversation with Claude Code — ask it to read files, answer questions, or write code.
- Wait for Claude Code to complete its response (the CLI process exits normally).
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·