Skip to content

Task .output files in /private/tmp grow unbounded (95GB+) #39909

@zvndev

Description

@zvndev

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

  1. Run a Claude Code session with multiple subagents (e.g., 5+ parallel agents via worktrees)
  2. One agent runs a command that produces infinite or very large output (interactive prompt in non-interactive shell, verbose build loop, etc.)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions