Trusted directory state lost after WSL2/system reboot — stored in /tmp
Resolved 💬 2 comments Opened Feb 22, 2026 by PavelZul Closed Feb 22, 2026
Description
Claude Code stores session/trust state in /tmp/claude-{UID}/, which is cleared on every system reboot (especially in WSL2). This causes the "Do you trust this directory?" prompt to reappear after each reboot, even though the user has already confirmed trust multiple times.
Steps to reproduce
- Launch Claude Code in a directory (e.g.
/home/user) - Confirm "trust this directory"
- Reboot the system (or restart WSL2)
- Launch Claude Code in the same directory
- Trust prompt appears again
Expected behavior
Trusted directory state should persist across reboots by storing it in ~/.claude/ rather than /tmp/.
Environment
- OS: Ubuntu 24.04 (WSL2) on Windows 11
- Kernel: Linux 6.6.87.2-microsoft-standard-WSL2
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗