[BUG] /tmp/claude path collision on shared HPC/multi-user systems

Resolved 💬 6 comments Opened Jan 14, 2026 by JRJacoby Closed Feb 28, 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?

I just ran into the issue reported in this blog post: https://asskbrhxy.blogspot.com/?page=en-git-anthropics-claude-code-1767940633010

What Should Happen?

Claude should respect TMPDIR so users can avoid path collisions and ownership issues with other users.

Error Messages/Logs

For example:

! ls -la /tmp/claude
  ⎿  Command failed: EACCES: permission denied, mkdir '/tmp/claude/-n-groups-datta-john-projects-byron-berkeley-collab-kpms'

Steps to Reproduce

  1. One user uses Claude Code on a shared HPC system and the user or model runs a shell command
  2. Another user uses Claude Code on the same node (/tmp is per-node) and the user or model attempts to run a shell command
  3. The second user's shell command will fail since the first user created and owns /tmp/claude

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.7

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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