claude-code - ๐Ÿ’ก(How to fix) Fix [BUG] Persistent server-side session billing phantom usage โ€” cannot be killed from client

Official PRs (โ€ฆ)
ON THIS PAGE

Recommended Tools

ร—6

Utilities matched from this issueโ€™s tags and category โ€” try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful ยท Quick feedback

Loadingโ€ฆ

Error Message

Error Messages/Logs

Root Cause

<hr> <h2>What Has Been Ruled Out</h2> <ul> <li>โœ… Not unauthorized account access (only 2 known sessions: phone + PC)</li> <li>โœ… Not rolling window misunderstanding</li> <li>โœ… Not Windows Task Scheduler tasks</li> <li>โœ… Not MCP connectors running independently</li> <li>โœ… Not Cowork scheduled tasks (disabled, confirmed in <code>scheduled-tasks.json</code>)</li> <li>โœ… Not a local process issue (session persists with app fully closed)</li> </ul> <hr> <h2>Root Cause Assessment</h2> <p>The session <code>cse_011xh9K8QGegFReA9TF8sShr</code> is a server-side persistent bridge session tied to environment <code>env_01SZgj3zV5duebrXCdeKRWba</code>. It appears to be:</p> <ol> <li><strong>Kept alive server-side</strong> regardless of client state</li> <li><strong>Re-attached to the same environment</strong> on every login, preventing logout from resetting it</li> <li><strong>Billing usage</strong> during periods when no local client is active</li> </ol> <p>The client has no mechanism to permanently invalidate this session. Only server-side invalidation of the session and environment IDs will resolve this.</p> <hr> <h2>Request</h2> <ol> <li><strong>Manually invalidate</strong> session <code>cse_011xh9K8QGegFReA9TF8sShr</code> and environment <code>env_01SZgj3zV5duebrXCdeKRWba</code> server-side</li> <li><strong>Investigate what billed 9% of a fresh 5-hour window</strong> between 15:00โ€“18:57 UTC on 2026-05-31 with no client active</li> <li><strong>Add a client-side mechanism</strong> to fully terminate persistent sessions (logout should invalidate server-side, not just drop the local token)</li> <li><strong>Consider crediting</strong> usage consumed by this phantom session</li> </ol> <hr> <h2>Related Issues</h2> <ul> <li>Orphaned background processes on Windows (app quit does not kill all <code>claude.exe</code> PIDs)</li> <li>Cowork scheduled tasks firing on app open when tasks were missed (batch fire bug)</li> </ul></body></html><!--EndFragment--> </body> </html>

Code Example

-
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

<html> <body> <!--StartFragment--><html><head></head><body><h1>Phantom Usage Billing from Persistent Server-Side Session โ€” Cannot Be Killed from Client</h1> <h2>Summary</h2> <p>A persistent server-side session (<code>cse_011xh9K8QGegFReA9TF8sShr</code>) is billing API usage against my Claude Pro account with no user-initiated activity. The session survives logout, process termination, phone session termination, and Cowork VM deletion. It reconnects automatically every time the app starts and polls <code>api.anthropic.com</code> continuously. Usage has been draining silently over 3โ€“4 days across fresh 5-hour windows.</p> <hr> <h2>Environment</h2> <ul> <li><strong>App version:</strong> 1.9659.2 (MSIX, Windows Store)</li> <li><strong>Platform:</strong> Windows 11 (win32 x64), OS 10.0.26200</li> <li><strong>CPU:</strong> AMD Ryzen 7 7840HS (16 cores)</li> <li><strong>Memory:</strong> 15 GB</li> <li><strong>Plan:</strong> Claude Pro</li> <li><strong>Install type:</strong> MSIX (windowsStore)</li> <li><strong>Account domain:</strong> iima.ac.in</li> </ul> <hr> <h2>Persistent Session Details</h2>
FieldValue
Session IDcse_011xh9K8QGegFReA9TF8sShr
Environment IDenv_01SZgj3zV5duebrXCdeKRWba
Account ID3db1c9d4-0eb8-4481-9636-da8170d39e1c
Org IDcd73ff3a-d5cb-4a7d-8492-8035d2578d73
First observed2026-05-28
Still active2026-05-31 21:17 UTC (confirmed)
<hr> <h2>What Has Been Ruled Out</h2> <ul> <li>โœ… Not unauthorized account access (only 2 known sessions: phone + PC)</li> <li>โœ… Not rolling window misunderstanding</li> <li>โœ… Not Windows Task Scheduler tasks</li> <li>โœ… Not MCP connectors running independently</li> <li>โœ… Not Cowork scheduled tasks (disabled, confirmed in <code>scheduled-tasks.json</code>)</li> <li>โœ… Not a local process issue (session persists with app fully closed)</li> </ul> <hr> <h2>Root Cause Assessment</h2> <p>The session <code>cse_011xh9K8QGegFReA9TF8sShr</code> is a server-side persistent bridge session tied to environment <code>env_01SZgj3zV5duebrXCdeKRWba</code>. It appears to be:</p> <ol> <li><strong>Kept alive server-side</strong> regardless of client state</li> <li><strong>Re-attached to the same environment</strong> on every login, preventing logout from resetting it</li> <li><strong>Billing usage</strong> during periods when no local client is active</li> </ol> <p>The client has no mechanism to permanently invalidate this session. Only server-side invalidation of the session and environment IDs will resolve this.</p> <hr> <h2>Request</h2> <ol> <li><strong>Manually invalidate</strong> session <code>cse_011xh9K8QGegFReA9TF8sShr</code> and environment <code>env_01SZgj3zV5duebrXCdeKRWba</code> server-side</li> <li><strong>Investigate what billed 9% of a fresh 5-hour window</strong> between 15:00โ€“18:57 UTC on 2026-05-31 with no client active</li> <li><strong>Add a client-side mechanism</strong> to fully terminate persistent sessions (logout should invalidate server-side, not just drop the local token)</li> <li><strong>Consider crediting</strong> usage consumed by this phantom session</li> </ol> <hr> <h2>Related Issues</h2> <ul> <li>Orphaned background processes on Windows (app quit does not kill all <code>claude.exe</code> PIDs)</li> <li>Cowork scheduled tasks firing on app open when tasks were missed (batch fire bug)</li> </ul></body></html><!--EndFragment--> </body> </html>

What Should Happen?

Error Messages/Logs

-

Steps to Reproduce

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

Vote matrix ยท Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loadingโ€ฆ

Still need to ship something?

ร—6

Another batch ranked right after the header list โ€” different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - ๐Ÿ’ก(How to fix) Fix [BUG] Persistent server-side session billing phantom usage โ€” cannot be killed from client