Description
Subagent task .output files in /private/tmp/claude-501/<project>/<session>/tasks/ can grow to tens of gigabytes without any size cap, filling up disk space silently.
Observed behavior
Found 95GB consumed by three .output files:
| Project |
File |
Size |
Cause |
| Headband |
bpnv8d8um.output |
46.1 GB |
Subagent output aggregation — all child agent JSON messages concatenated into one file |
| AnnasTeech |
bx09ukqis.output |
43.5 GB |
Same — unbounded agent output aggregation |
| time-guy |
b95uphkyk.output |
5.0 GB |
sentry-cli login interactive prompt looped infinitely printing invalid input! |
All other .output files in the same directories were normal size (10KB–100KB).
Expected behavior
Task output files should have a size cap (e.g., 50MB or 100MB) to prevent unbounded growth. When a cap is hit, either truncate with a warning or stop capturing.
Steps to reproduce
- Run a Claude Code session with multiple subagents (e.g., 5+ parallel agents via worktrees)
- One agent runs a command that produces infinite or very large output (interactive prompt in non-interactive shell, verbose build loop, etc.)
- The corresponding
.output file in /private/tmp/claude-501/ grows without limit
Environment
- macOS (Darwin 25.3.0)
- Claude Code with heavy subagent usage (product-review, product-sprint workflows with parallel agents)
- Files located at:
/private/tmp/claude-501/<project-path>/<session-uuid>/tasks/<task-id>.output
Workaround
rm -rf /private/tmp/claude-501 — these are ephemeral task output captures and safe to delete. Directory is also cleared on reboot.
Description
Subagent task
.outputfiles in/private/tmp/claude-501/<project>/<session>/tasks/can grow to tens of gigabytes without any size cap, filling up disk space silently.Observed behavior
Found 95GB consumed by three
.outputfiles:bpnv8d8um.outputbx09ukqis.outputb95uphkyk.outputsentry-cli logininteractive prompt looped infinitely printinginvalid input!All other
.outputfiles in the same directories were normal size (10KB–100KB).Expected behavior
Task output files should have a size cap (e.g., 50MB or 100MB) to prevent unbounded growth. When a cap is hit, either truncate with a warning or stop capturing.
Steps to reproduce
.outputfile in/private/tmp/claude-501/grows without limitEnvironment
/private/tmp/claude-501/<project-path>/<session-uuid>/tasks/<task-id>.outputWorkaround
rm -rf /private/tmp/claude-501— these are ephemeral task output captures and safe to delete. Directory is also cleared on reboot.