Temporary tmpclaude-*-cwd files not cleaned up after sessions

Resolved 💬 5 comments Opened Jan 13, 2026 by Rsrsys Closed Feb 26, 2026

Description

Claude Code is leaving behind temporary files named tmpclaude-XXXX-cwd (where XXXX is a random hash) scattered throughout the working directory and its subdirectories. These files are not being cleaned up when sessions end.

Evidence

After approximately 2 days of irregular usage, I found and deleted 170 temporary files across various project subdirectories.

Example filenames:

  • tmpclaude-6e63-cwd
  • tmpclaude-9b89-cwd
  • tmpclaude-a929-cwd

These files were found in multiple nested directories throughout the workspace.

Expected behavior

Temporary files should be automatically cleaned up when:

  • A session ends normally
  • A session is interrupted
  • Subagents/tasks complete

Environment

  • Platform: Windows 11
  • Claude Code CLI

Workaround

Manual cleanup with: find . -name "tmpclaude*" -type f -delete

View original on GitHub ↗

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