[BUG] Resource Exhaustion and Crashes with Claude Sonnet 4.5 in Claude Code Agents (WSL2)

Resolved 💬 3 comments Opened Oct 2, 2025 by amitflank Closed Jan 7, 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?

Bug Report: Claude Sonnet 4.5 Agents Cause Disk I/O Saturation and Crashes on “Write Tests” Assignments

Description

When assigning Claude Code agents to “write tests” tasks using Claude 4.5 Sonnet, the agent consumes all available disk I/O and memory resources, freezes, and requires force-killing the entire WSL session.

  • Issue occurs 100% of the time when the task is “write tests.”
  • Reproducible with any number of agents (tested with 4, 2, and 1).
  • Does not occur with Opus model in the same setup (disk usage remains <10%, memory stable).

---

Environment

  • OS: Windows 11 + WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
  • Claude Code version: 2.0.1
  • Problematic Model: Claude 4.5 Sonnet
  • Working Model: Claude Opus (claude-opus-4-1-20250805)
  • Platform: VS Code + WSL2

---

Steps to Reproduce

  1. Set agent model to Claude 4.5 Sonnet.
  2. Create a Testing Agent (or use Main Agent).
  3. Assign the agent a task to “write tests” for an existing python file (~300 lines).
  4. Observe resource usage:
  • Disk I/O spikes to 100% after a few moment
  • Memory grows unbounded
  • Agent becomes unresponsive
  • Cannot be killed normally → requires terminating WSL session

---

Expected Behavior

  • Sonnet should handle “write tests” tasks with normal resource use. It also should not consume all recourses for other tasks.
  • Performance should be similar to Opus (<10% disk, memory stable).

---

Attempted Troubleshooting

  • Reduced number of agents (4 → 2 → 1) → same result
  • Purged cache data → no effect
  • Restarted Claude Code → crash recurs immediately
  • Only workaround: switch model to Opus

---

Impact / Severity

Critical — prevents use of Sonnet 4.5 in Claude Code for test generation and other tasks.

  • Testing Agent: unusable (always crashes).
  • Main Agent: unreliable under similar tasks. Also seems to crash when doing other tasks though i dont know the theme.

---

Additional Context

  • No error logs before freeze.
  • Appears task-specific (always triggered by “write tests” assignment).
  • Behavior resembles memory bug #7985 but adds disk I/O exhaustion.

---

Monitoring Data

  • Sonnet 4.5: Disk I/O 100%, Memory runaway, unresponsive
  • Opus: Disk I/O <10%, Memory normal, stable execution

What Should Happen?

Expected Behavior

  • Sonnet should handle “write tests” tasks with normal resource use. It also should not consume all recourses for other tasks.
  • Performance should be similar to Opus (<10% disk, memory stable).

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Set agent model to Claude 4.5 Sonnet.
  2. Create a Testing Agent (or use Main Agent).
  3. Assign the agent a task to “write tests” for an existing python file (~300 lines).
  4. Observe resource usage:
  • Disk I/O spikes to 100% after a few moment
  • Memory grows unbounded
  • Agent becomes unresponsive
  • Cannot be killed normally → requires terminating WSL session

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.1

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

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