[BUG] Claude is not removing /tmp files (`claude-8c89-cwd`) on exit

Resolved 💬 2 comments Opened Oct 14, 2025 by MarcinOrlowski Closed Oct 14, 2025

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 creates lot of claude-*-cwd files in temp folder but then it leaves it there and not clear things up. Would be nice to do some housekeeping on exit (perhaps it would be more useful to create one temp folder per session and put all temp files into that folder and then just remove folder on exist.

What Should Happen?

I'd like Claude to cleanup his stuff on exit.

Error Messages/Logs

Steps to Reproduce

Do some work that would trigger claude-???-cwd temp file to be created. Then exit Claude. File remains.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.14

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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