Windows: directory trust prompt repeats every session, never persists
Bug Description
On Windows, Claude Code asks "Do you trust this directory?" every single time it starts, even after the user selects "Yes". The trust choice is never persisted between sessions.
Steps to Reproduce
- Open PowerShell on Windows (defaults to home directory
C:\Users\<username>) - Run
claude - Get prompted to trust the directory — select Yes
- Exit Claude Code
- Run
claudeagain - Get prompted to trust the directory again
This repeats indefinitely. The trust selection is never saved.
Expected Behavior
After trusting a directory once, Claude Code should remember that choice and not ask again on subsequent launches.
Why This Matters
On Windows, every new PowerShell/terminal session starts in the user's home directory (C:\Users\<username>). This is the default workflow for virtually every Windows user. Being asked to trust the directory on every single launch makes the experience feel broken and is a significant friction point.
Environment
- OS: Windows 11 (MSYS_NT-10.0-26200)
- Shell: PowerShell (Claude Code uses bash/MSYS internally)
- Working directory:
C:\Users\<username>(home directory, not a git repo) - Claude Code: Latest (native installer)
Additional Context
- No
trusted_directories.jsonor similar file is created in~/.claude/ - The
settings.jsonschema has notrustedDirectoriesfield, so there appears to be no mechanism to persist this setting - The home directory is not a git repository, which may be related to why trust isn't persisted
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗