Large agent output saved to /tmp is lost after reboot
Problem
When a subagent's output exceeds the inline size limit, Claude Code saves it to a file under /private/tmp/claude-<uid>/ and returns the path to the user:
Full transcript available at: /private/tmp/claude-501/.../tasks/a734756aea081ee40.output
The problem: /tmp is volatile. The file is gone after a reboot (or sooner), but the reference to it persists in session history. When the user revisits the session later, the path is dead.
Expected behavior
The output directory should be configurable, defaulting to a durable location like ~/.claude/output/ or ~/.claude/tasks/. Volatile storage like /tmp should be opt-in, not the default.
Suggested approach
Add a setting (e.g., agent_output_dir) that controls where large agent outputs are written. Default to a persistent location. Users who want volatile storage can explicitly set it to /tmp.
Alternatively, if the output must be ephemeral by default, don't show the user a file path — inline a truncated version instead, so nothing references a file that won't exist later.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗