Task output temp file grew to 1.4 TB, filling disk — /private/tmp/claude-501/[session]/tasks/*.output

Resolved 💬 3 comments Opened Mar 17, 2026 by naodya Closed May 1, 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?

A temporary task output file created by Claude Code under /private/tmp/claude-501/ grew to 1.4 TB, completely filling my disk.

File path pattern:

/private/tmp/claude-501/<session-id>/tasks/<taskname>.output

The specific file was bpnhmxvxm.output, dated Mar 14, 2026 at 2:16 AM, and reported as 1.4 TB in macOS Finder. Other .output files in the same directory are normal sizes (2 KB, 3 KB, 633 KB, 31 KB). This one file appears to have grown unbounded — likely a runaway write loop or stdout/stderr not being capped during parallel task execution.

Steps to reproduce:

  1. Run Claude Code with an agentic/multi-step task (e.g., using subagents or parallel tasks)
  2. Monitor /private/tmp/claude-501/ disk usage
  3. Observe one .output file growing unbounded until disk is full

Environment:

  • OS: macOS (path: Macintosh HD > private > tmp > claude-501)
  • Session temp dir: /private/tmp/claude-501/
  • File in question: .../cf50a1f0-0feb-4de8-a8a9-a6eb50aae0ca/tasks/bpnhmxvxm.output

What Should Happen?

Temp task output files should be bounded in size. Claude Code should not fill the user's disk. Suggested fixes:

  • Cap .output file size or truncate/rotate after a threshold
  • Add disk space checks before writing task output
  • Clean up /private/tmp/claude-501/ on session end

Error Messages/Logs

Steps to Reproduce

This happens as Claude plans and creates taks.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.77 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

<img width="1048" height="152" alt="Image" src="https://github.com/user-attachments/assets/0b2e2e84-7415-48dd-95d7-4cd0a3a7a97d" />

View original on GitHub ↗

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