[BUG] Bash tool fails silently when /tmp is full

Resolved 💬 5 comments Opened Apr 2, 2026 by xjh19971 Closed May 23, 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?

When /tmp has no free disk space, all Bash tool invocations fail silently with Exit code 1, regardless of the command. There is no indication that the failure is due to disk space.

What Should Happen?

Claude Code should detect insufficient disk space in /tmp and surface a clear error message, e.g.:
▎ "Bash tool failed: insufficient disk space in /tmp. Free space and try again."

Error Messages/Logs

Generic Error: Exit code 1 with no explanation. This is confusing and hard to debug, especially on shared systems where /tmp filling up is outside the user's control.

Steps to Reproduce

  1. Be on a system where /tmp is full (common on shared HPC/cluster nodes)
  2. Run any Bash tool call, even a trivial one:

Bash(bash --version)

  1. Result:

Error: Exit code 1

  1. Free space in /tmp → the same command succeeds

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.90

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

The Bash tool likely writes temporary files (scripts, output capture) to /tmp. When there's no space, these writes fail, causing the spawned process to exit with code 1. A pre-check for available /tmp space or catching ENOSPC errors would improve the user experience significantly.

View original on GitHub ↗

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