[BUG] Orphaned --resume process consumes tokens silently after WSL reconnect + extension update

Resolved 💬 1 comment Opened Apr 29, 2026 by LoganBresnahan Closed May 31, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

After a machine sleep/wake cycle with WSL and the VS Code remote extension, Claude Code spawned a duplicate background process that silently consumed a significant amount of my monthly token usage with no UI indication.

Environment

  • OS: WSL (Windows Subsystem for Linux)
  • Editor: VS Code with Claude Code remote extension
  • Extension versions involved: 2.1.120 (original session), 2.1.122 (after auto-update on reconnect)

Problem

Two claude processes running simultaneously:

  • The active session visible in the UI (v2.1.122, PID 53234)
  • A silent background process (v2.1.120, PID 35044) with --resume <session-id>, accumulating CPU time and burning tokens with no UI representation
35044  1.0  0.3  ...  09:52   7:57  claude --resume 9607039b-32fd-4571-9b78-9daf2ce4f5e5 ...
53234  1.3  0.9  ...  22:56   0:01  claude ...

The orphaned process (PID 35044) had been running since 09:52 — approximately 5 hours — with no user interaction and no visibility in the UI.

Impact

Usage went from an expected ~0% to 74% of my session allocation, discovered only by manually refreshing the usage page. There was no in-app warning, notification, or any indication that a background process was consuming tokens.

What Should Happen?

  • On reconnect, the extension should detect and terminate any pre-existing claude processes before spawning a new one
  • OR: orphaned background sessions should surface in the UI with an option to terminate them

Error Messages/Logs

Steps to Reproduce

  1. Start an active Claude Code session in VS Code (extension v2.1.120)
  2. Machine goes to sleep, dropping the WSL/VS Code remote connection
  3. The extension host dies abruptly without sending a clean shutdown signal to the claude subprocess
  4. On wake, VS Code reconnects to WSL and restarts the Claude Code extension — which has auto-updated to v2.1.122
  5. The new extension spawns a fresh session (new process) but also sees the previous incomplete session in state and issues a --resume <session-id> call

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.199

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗