[BUG] Sandbox permission error after update: EACCES permission denied mkdir /tmp/claude/.../tasks

Resolved 💬 3 comments Opened Jan 8, 2026 by douglashardman 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?

After updating Claude Code today (Jan 8, 2026), bash commands intermittently fail with a sandbox permission error when Claude tries to create a tasks directory under /tmp/claude/. The sandbox encodes the working directory path into the folder name (e.g., -path-to-project). This did not occur before the update.

What Should Happen?

Bash commands should execute without sandbox permission errors, as they did prior to the update.

Error Messages/Logs

EACCES: permission denied, mkdir '/tmp/claude/-path-to-project/tasks'

Steps to Reproduce

  1. Update Claude Code to latest version
  2. Open a project directory
  3. Run a bash command via the Bash tool (e.g., sudo systemctl status myservice)
  4. Command fails with the permission error above
  5. Retrying the same command with dangerouslyDisableSandbox: true succeeds

Additional Context

  • Platform: Linux (Ubuntu)
  • Failure is intermittent
  • Workaround: dangerouslyDisableSandbox: true bypasses the issue

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.1 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

/tmp/claude/ directory ownership issue:

drwxrwxr-x 4 user user 4096 Dec 19 18:10 /tmp/claude/

Multiple users share this machine.
The /tmp/claude/ directory was created by user 'user1',
so user 'user2' cannot create subdirectories within it.

The sandbox tries to create /tmp/claude/-project-directory/tasks
but lacks permission because /tmp/claude/ is owned by a different user.

Root cause: Claude Code uses a shared /tmp/claude/ directory that doesn't handle multi-user environments. The first user to run Claude Code owns the directory, blocking other users.

Suggested fix: Either use user-specific paths (e.g., /tmp/claude-$USER/) or create /tmp/claude/ with drwxrwxrwt (sticky bit like /tmp/ itself).

View original on GitHub ↗

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