[BUG] Large number of vitest processes spawned, not cleaned up, grow in memory footprint and eventually consume all RAM

Resolved 💬 3 comments Opened Aug 24, 2025 by virgildotcodes Closed Aug 28, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other:
  • Claude CLI version: 1.0.89
  • Operating System: MacOS 15.6.1
  • Terminal: Ghostty + iTerm2

Bug Description

When using Claude Code to run vitest test suites, I began noticing that my computer would randomly start chugging and becoming virtually unusable. Checking Activity Monitor I would see half a dozen or more instances of vitest, some of them consuming multiple gigs of memory. I have 32 GB of ram and vitest processes eventually grow to consume all of it.

Even after the tests are done being run, and CC is onto something else, the processes remain.

Steps to Reproduce

  1. Run a large vitest test suite
  2. Iterate, fixing bugs as you go and rerunning the test suite over and over
  3. Check activity monitor and look for a growing number (and growing memory consumption) of vitest processes

Expected Behavior

Vitest should be cleaned up after each test run.

Actual Behavior

Vitest processes accumulate in number and memory footprint.

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗