[BUG] Claude on native Windows repeatedly asks to trust folder

Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 15 comments · opened Jul 11, 2025 · closed Aug 2, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude on Windows (local installation)
  • Claude CLI version: .51
  • Operating System: Windows 11
  • Terminal: Windows Terminal, PowerShell, CMD

---

Bug Description

Claude on Windows repeatedly asks "Do you trust the files in this folder?" for the same directory every time it's accessed or a command is run, even after the user has previously selected "Yes, proceed." This behavior is unexpected, as it should only prompt for trust the first time a new folder is encountered.

---

Steps to Reproduce

  1. Open a terminal (e.g., Windows Terminal, PowerShell).
  2. Navigate to a project folder (e.g., D:\Frontend\admin).
  3. Execute a Claude command or interaction that requires file access within this folder.
  4. Select "1. Yes, proceed" when prompted "Do you trust the files in this folder?".
  5. Close the terminal or end the Claude session.
  6. Re-open the terminal and navigate back to the same project folder.
  7. Execute another Claude command or interaction.

---

Expected Behavior

After initially selecting "Yes, proceed" for a specific folder, Claude should remember this trust setting and not prompt again for the same folder in subsequent sessions or interactions.

---

Actual Behavior

Claude repeatedly prompts "Do you trust the files in this folder?" every time the application is used in or accesses the previously trusted folder, even though the user has already granted permission.

---

View original on GitHub ↗

15 Comments

ant-kurt collaborator · 1 year ago

Can you check if your .claude.json file (probably located at %UserProfile%\.claude.json) is well-formed? It should have a block that looks like this:

"projects": {
  "C:\\your\\project": {
    "allowedTools": [],
  }  
}
jacobhallgren · 1 year ago

This fixed it for me edit your .claude.json in users/YourName

Old config not working:

"projects": {
  "C:/Users/YourName/Documents/YourProject": {
    "allowedTools": []
  }
}

working:

"projects": {
  "C:\\Users\\YourName\\Documents\\YourProject": {
    "allowedTools": []
  }
}
0xfell · 1 year ago

Using vscode extension Claude Code on Windows 11, it opens the project with PS C:/path/to/folder> claude and creates the C:/path/to/folder project at the .claude.json.

So it will always throw that prompt unless you have two "projects" at the .claude.json

"projects": {
  "C:/path/to/folder": {
    "history": [
      {
        "display": "hi",
        "pastedContents": {}
      }
    ],
    "hasTrustDialogAccepted": true,
  }
 "C:\\path\\to\\folder": {
    "history": [],
    "hasTrustDialogAccepted": true,
  }
}

So it does fix the Trust Dialog showing everytime but the C:/path/to/folder will have the history and any change on it.

Claude Code: v1.0.55

vuhoanglam · 1 year ago

any update? one more bug, if i want to init and work in sub directory of a git repo, it always just add root repo to .claude.json

ant-kurt collaborator · 1 year ago

Can you confirm if this is still broken for you @vuhoanglam? I'm unable to repro on latest Claude Code - launching in PS via terminal or VS Code extension sets correct project path (like C:\\path\\to\\folder) in .claude.json, and history appears under this one even if I manually create a C:/path/to/folder entry.

princemaple · 1 year ago

@ant-kurt I can still reproduce this one. With claude code 1.0.65, I tried both Powershell and Nushell. Tried both tabby and windows terminal.

ant-kurt collaborator · 1 year ago

@princemaple can you share the details of your ✻ Welcome to Claude Code! displayed cwd and how it compares against the permission prompt path and the path persisted to .claude.json? These should all three be Windows-style (with double backslashes in the JSON), but I'm guessing on your environment one or more is not

princemaple · 1 year ago

@ant-kurt ~all are with /. I tried replacing them in .claude.json with \\, this gets rid of the trust prompt but still puts the history in a new one with /.~

I take that back, I apparently was blind. See screenshot.

<img width="1142" height="799" alt="Image" src="https://github.com/user-attachments/assets/3c6ef53e-7ddb-4361-a05f-a9cc5fb80a5c" />

princemaple · 1 year ago

Sorry wrong info provide. See updated comment with screenshot ^

In .claude.json they are all with /. Replacing them with \\ gets rid of the trust prompt but still creates a new one with /.

ant-kurt collaborator · 1 year ago

We have a fix inbound - likely releasing on Aug 4. FYI this issue was specific to launching Claude Code within git repositories on Windows.

We're aligning on C:\\style\\paths as the correct format for .claude.json entries on Windows (excluding WSL). For those of you running Claude Code inside cygwin or similar, if you want to preserve history / etc, you will want to manually convert the paths in your .claude.json.

jacobhallgren · 1 year ago
We have a fix inbound - likely releasing on Aug 4. FYI this issue was specific to launching Claude Code within git repositories on Windows. We're aligning on C:\\style\\paths as the correct format for .claude.json entries on Windows (excluding WSL). For those of you running Claude Code inside cygwin or similar, if you want to preserve history / etc, you will want to manually convert the paths in your .claude.json.

Good that you have that.

This one is particularly frustrating, there’s been complete silence from your team about it.

https://github.com/anthropics/claude-code/issues/3301

ant-kurt collaborator · 1 year ago

This issue (3366) should be resolved in 1.0.68.

princemaple · 1 year ago

Can confirm it's resolved.

vuhoanglam · 1 year ago

Thanks for the hard work, @ant-kurt

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.