[BUG] Sandbox creates tmpclaude-*-cwd directories in workspace instead of system temp folder

Resolved 💬 3 comments Opened Jan 13, 2026 by veerabhadra-ponna Closed Feb 26, 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?

Description

Claude Code is creating temporary sandbox directories (tmpclaude-XXXX-cwd) in the current workspace/repository root instead of the system temp folder (%TEMP% on Windows, /tmp on Linux/Mac).

Environment

  • OS: Windows
  • Claude Code version: [your version]
  • Started occurring: ~January 12-13, 2025

Impact

  • Pollutes workspace with temp files
  • Shows up in file explorer/IDE sidebar
  • Requires manual cleanup or .gitignore entry
  • This behavior started recently (was not present before ~Jan 12, 2025)

Workaround

Add tmpclaude-* to .gitignore and periodically delete the directories manually.

<img width="1372" height="594" alt="Image" src="https://github.com/user-attachments/assets/b45bb5f1-e6fe-4edb-b9b8-e473969eb3a9" />

What Should Happen?

Expected Behavior

Temporary sandbox directories should be created in the system temp folder, not in the user's workspace.

Error Messages/Logs

## Actual Behavior
Multiple `tmpclaude-XXXX-cwd` directories accumulate in the repository root:
tmpclaude-0b14-cwd/
tmpclaude-6b47-cwd/
tmpclaude-08b6-cwd/
tmpclaude-85e8-cwd/

Steps to Reproduce

Steps to Reproduce

  1. Open Claude Code in any repository
  2. Run any Bash command (e.g., ls, git status)
  3. Check the repository root directory

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.76 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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