Sandbox should create $TMPDIR directory automatically
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 1 comment · opened Apr 17, 2026 · closed Apr 17, 2026
Summary
When sandbox is enabled, Claude Code sets TMPDIR=/tmp/claude but does not create this directory. This causes tools like just (and any command that writes temp files) to fail with:
IO error while trying to create a temporary directory: No such file or directory (os error 2) at path "/tmp/claude/just-fFRcbs"
Expected behavior
The sandbox should ensure $TMPDIR exists before executing any commands, since it's the sandbox that sets this non-standard path.
Current workaround
Adding mkdir -p /tmp/claude as a SessionStart hook.
Environment
- macOS (Darwin 25.2.0, arm64)
- Claude Code with sandbox enabled
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗