claude-code - 💡(How to fix) Fix [BUG] macOS Desktop App "Coworkd" VM Infinite Loop silently drains Pro Quota via orphaned subagents [2 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#52016Fetched 2026-04-23 07:38:47
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

Error Message

[warn] [LOCAL_SESSION] Subagent parent not found for user message - possible out of order processing

Error Messages/Logs

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?

Bug Description

There is a severe bug in the Claude macOS Desktop App involving the "Local Agent Mode" (Cowork feature). A background daemon (coworkd) running inside a hidden Linux VM goes into an infinite loop, spawning orphaned headless instances of claude that completely drain the user's Pro usage quota in seconds (jumping from 6% to 100%), even when the app, IDEs, and Terminals are completely closed.

Environment

  • OS: macOS 26.4
  • Application: Claude Desktop App (macOS) / coworkd / claude-code
  • Date of incident: April 22, 2026
  • Impact: Total loss of paid Pro quota limits without user interaction.

Evidence from Local Logs

Upon inspecting the local macOS logs (~/Library/Application Support/Claude/logs), I discovered the exact mechanism of the quota drain:

  1. VM Initialization: The macOS app silently spins up a Linux VM in the background via vzgvisor (seen in vzgvisor.log and cowork_vm_swift.log).
  2. Orphaned Agents: Inside the VM, a coworkd daemon is running. It spawned headless subagents with generated user names (e.g., lucid-exciting-dirac, epic-intelligent-keller). This is visible in coworkd.log.
  3. The Infinite Loop: My main.log is flooded with thousands of consecutive errors: [warn] [LOCAL_SESSION] Subagent parent not found for user message - possible out of order processing
  4. The Drain: These background instances are being executed with the following parameters, consuming massive context instantly: --model claude-sonnet-4-6 --max-thinking-tokens 31999

main.log coworkd.log

What Should Happen?

  • Background syncs or "Local Agent" daemons should never consume user subscription quotas without explicit foreground execution.
  • If a subagent loses its parent process (Subagent parent not found), it should gracefully exit, not enter an infinite loop of max-token API calls.

Error Messages/Logs

Steps to Reproduce

  1. The user does not need to do anything. The terminal, VS Code, and active Claude Desktop windows were entirely CLOSED for days.
  2. The background claudevm.bundle process executes the subagents on its own.
  3. The Pro quota immediately spikes to 100%.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude 1.3883.0 (93ff6c) 2026-04-21T17:24:01.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by stopping the coworkd daemon and preventing the claudevm.bundle process from executing subagents in the background.

Guidance

  • Investigate the coworkd daemon configuration to determine why it's spawning orphaned subagents and entering an infinite loop.
  • Verify that the claudevm.bundle process is not supposed to run in the background without user interaction, and consider modifying its execution parameters to prevent quota consumption.
  • Check the main.log and coworkd.log files for any patterns or errors that could indicate the root cause of the issue.
  • Consider implementing a mechanism to gracefully exit subagents when they lose their parent process, as described in the "What Should Happen?" section.

Example

No code snippet is provided, as the issue is related to a specific application and its configuration.

Notes

The issue seems to be related to a regression, as it worked in a previous version. However, the last working version is not specified. It's essential to investigate the changes made between versions to identify the root cause.

Recommendation

Apply a workaround by stopping the coworkd daemon and preventing the claudevm.bundle process from executing subagents in the background, as this will prevent the quota from being consumed immediately.

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