[BUG] [Windows] VS Code extension still leaks orphan claude.exe processes in 2.1.281 (one per window at startup, plus /clear and loading from history)

Status Open
Reported on v2.1.281
Maintainer reply None cached
Activity 0 comments · opened Sep 24, 2026

Environment: Windows 11 (build 26200), VS Code with 6 windows, Claude Code 2.1.281 (extension + CLI).

What happens
The extension accumulates claude.exe processes that no longer back any visible session:

  1. At VS Code startup: each window spawns one extra claude.exe with no --resume and no session .jsonl created after it starts. Measured today: 12 processes under Code.exe for 6 real sessions. The 6 extra ones (one per window, all started when the window opened) used ~190–235 MB each, ~1.2 GB in total. Killing them affected no visible session.
  2. /clear: a new process is spawned and the previous one stays alive.
  3. Loading a session from the history list: same behavior, the old process is not terminated.

Expected: one claude.exe per live session, with the previous process ended on /clear or when switching sessions.

How to reproduce
Open VS Code with several windows that restore Claude Code sessions, then list claude.exe processes with their parent chain and command line. Every window has one process without --resume in addition to its real sessions. Run /clear, or load an older session from history, and the count goes up.

History
Seen continuously since at least 2.1.240 (August 2026) and cleaned up manually many times. Previous reports are closed and locked, so they can't be updated:

  • #29413 — closed as not planned
  • #32792 — closed as completed, but the startup case still reproduces in 2.1.281
  • #72109 — closed as duplicate

View original on GitHub ↗