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

Resolved 💬 3 comments Opened Jan 9, 2026 by maxikagan Closed Jan 12, 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?

Claude Code hardcodes /tmp/claude/ for task management and background processes. On shared multi-user systems (HPC clusters, shared servers), the first user to run Claude creates this directory with default permissions (755). All subsequent users receive permission denied errors:

Error: EACCES: permission denied, mkdir '/tmp/claude/-global-home-users-username--claude/tasks'

This affects:

  • The Task tool (agent subprocesses)
  • Background tasks (run_in_background)
  • Plugin installation
  • Any operation that spawns child processes

Core functionality (Read, Write, Edit, Grep, Glob) still works, but agent-based workflows are broken.

What Should Happen?

Expected Behavior

Claude Code should either:

  1. Respect the TMPDIR environment variable for all temp directory operations
  2. Provide a configuration option (e.g., CLAUDE_TMPDIR or setting in settings.json)
  3. Use a user-specific temp path like /tmp/claude-$USER/ or $HOME/.claude/tmp/

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. User A runs Claude Code on a shared system → /tmp/claude created with permissions drwxr-xr-x owned by User A
  2. User B runs Claude Code on the same system → EACCES error because User B cannot write to /tmp/claude

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.2

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

PowerShell

Additional Information

Workarounds Attempted

  • Setting TMPDIR environment variable → No effect, Claude ignores it
  • Adding env vars to settings.local.json → No effect
  • Manual directory creation → Cannot create inside /tmp/claude without permissions

Current Workaround

Contact system administrators to remove /tmp/claude so it can be recreated, but this is not sustainable on shared systems.

Additional Context

This is a common issue on:

  • University HPC clusters
  • Shared development servers
  • Container environments with shared /tmp
  • Any multi-tenant Linux system

Related issues: #14242, #10194, #11079

View original on GitHub ↗

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