Background task output file grew to 459GB filling disk
Resolved 💬 2 comments Opened Mar 31, 2026 by watchlight-ai Closed Mar 31, 2026
Bug Report
Description
A subagent background task produced a single output file that grew to 459GB, filling the entire disk. The file was located at:
/private/tmp/claude-501/-Users-<user>-Development-<project>/tasks/bjy1z7k8u.output
What happened
The file appears to be a concatenation of all subagent .output symlink targets — it starts with === a0031d70159a27d1c.output === followed by JSONL conversation logs. It seems like a task that was meant to aggregate/list subagent outputs ran without any size limit and kept writing indefinitely.
The file contained JSONL subagent conversation logs (tool calls, responses, etc.)
Impact
- Filled 459GB of a 926GB disk (50% of total disk)
- macOS reported disk full warnings
- Docker builds and other operations failed due to lack of space
Environment
- Claude Code version: 2.1.72 (at time of creation, based on file contents)
- OS: macOS Darwin 25.3.0 (Apple Silicon)
- The file was created around 2026-03-30
Expected behavior
Background task output files should have a size cap or automatic cleanup. A single temp file should never be allowed to grow unbounded.
Suggested fixes
- Enforce a max file size for background task output files (e.g., 100MB)
- Rotate or truncate output files when they exceed a threshold
- Add periodic cleanup of stale temp files in
/private/tmp/claude-* - Warn the user when temp directory usage exceeds a configurable limit
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗