[Bug] Runaway command output creates massive log files when interactive prompts receive piped input

Resolved 💬 3 comments Opened Mar 16, 2026 by blievens89 Closed Mar 20, 2026

Bug Description

Title: Task output file grew to 851GB — runaway stdin auto-yes filled disk

What happened

I came back to my machine and found an 851GB file sitting in the Claude Code temp directory. My disk was nearly full.

The culprit was a single task output file:

C:\Users\xxxx\AppData\Local\Temp\claude\C--Users-xxxx-Documents-xxxx\
f9c2404f-358f-4e9b-b17c-fb32d2831e75\tasks\bixm0bxrx.output

The entire 851GB file was just the letter y on every line, billions of times. Looks like a subagent/background task ran a command that prompted for
interactive confirmation (y/n), and whatever was feeding stdin just kept pumping y indefinitely. The output was captured to the task file with no size
limit, so it ate my whole disk.

Steps to reproduce

I don't have the exact command that triggered it, but the pattern seems to be:

  1. A background task (subagent) runs a shell command that unexpectedly prompts for user input
  2. The system auto-responds with y to stdin (maybe piped from /dev/null or yes?)
  3. The command keeps asking, the system keeps answering, and the output file grows unbounded
  4. There's no file size cap or timeout that catches this

Expected behavior

  • Task output files should have a reasonable size limit (e.g. 100MB) — if a single output file hits that, kill the task and warn the user
  • Commands that produce repetitive/runaway output should be detected and stopped
  • At minimum, there should be disk space monitoring so Claude Code doesn't silently fill the drive

Environment

  • OS: Windows 10 (MSYS2/Git Bash)
  • Claude Code version: Latest as of March 15, 2026
  • Model: Opus
  • File date: 2026-03-15 17:40

Other files in the directory

All other task output files in the same directory were normal sized (33KB to 9.6MB). This was a one-off runaway, but one occurrence was enough to eat 851GB.

Impact

Pretty severe — it silently consumed nearly all available disk space. I only noticed because things started failing. No warning, no error, no cleanup. If I
hadn't investigated manually I wouldn't have known where the space went.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.76
  • Feedback ID: eaf1d42b-a450-42ec-99f3-7e81236c5e50

Errors

[{"error":"Error: Request was aborted.\n    at T2A (B:/~BUN/root/src/entrypoints/cli.js:1244:68107)\n    at next (native:1:11)\n    at C5_ (B:/~BUN/root/src/entrypoints/cli.js:6300:6932)\n    at next (native:1:11)\n    at m5_ (B:/~BUN/root/src/entrypoints/cli.js:6305:9186)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-16T19:14:47.006Z"}]

View original on GitHub ↗

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