[Feature Request] Add option to skip trust prompt when .claude/settings.local.json allows it
Bug Description
Feature request: Option to skip trust prompt when settings.local.json exists
Use case: I use git worktrees extensively, with a shared settings.local.json symlinked across all worktrees. Each
worktree is a different absolute path, so I get the "Do you trust the files in this folder?" prompt every time I open
Claude in a new worktree - even though I've already explicitly configured my permissions in settings.local.json.
The problem: The existence of a .claude/settings.local.json file with permissions.allow entries is itself an explicit
declaration of trust. Prompting me to confirm trust for a directory where I've already placed a carefully crafted
settings file is redundant. I wrote the file - I obviously trust it.
Proposed solution: Add a setting (in ~/.claude/settings.json or CLI flag) like:
{
"trustProjectsWithLocalSettings": true
}
Or a CLI flag: --trust-local-settings
When enabled, if .claude/settings.local.json exists in the project, skip the trust prompt entirely. The settings file IS
the trust declaration.
Current workaround: Manually accepting the prompt in every new worktree, which defeats the purpose of having shared,
pre-configured settings.
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 2.0.57
- Feedback ID: 78151e3f-2e79-41b7-91b9-a7d8f95748c0
Showing cached comments. Read the full discussion on GitHub ↗
13 Comments
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This is still occurring, and I would like it too 😊
We ran into this issue trying to use worktrees as well. Took some playing around but it looks like claude trusts all subdirectories of a trusted folder if those subdirectories dont have their own .claude. So you can solve this by:
.claude/into worktree directoriesmy-app-worktrees/.claude/into themy-app-worktrees/and accept the trust prompt oncei.e the structure will look like:
You should no longer get the trust prompt in new worktrees
Still hoping for this as it's really annoying in worktrees. I saw it's not the only request.
@jtmarmon thank you for your workaround, but since
.claudealready exists in the base repo, it's going to end up in the worktrees as well. Making a change shows it up in git status.Worktrees are the biggest reason to have this feature. In a way what I would like even more is to associate permissions with a base route that all of a single repo's worktrees are located so they can all share the same permissions and even resume sessions.
+1 running into this aswell with worktrees, without this you're kind of stuffed trying to create new worktrees for agents to work on - you have to approve each one. Running into the same issue with the workaround mentioned above by @shkm
the base repo has a
.claudedirectory.+1
I would love any claude settings.* file to be able to allow it, not only settings.local.json.
Follow-up, i have this working for my workflow, which is based around worktrees. Once the main repo is trusted, I create worktrees inside $REPO/.worktress/branch-name. We can avoid the "change is in git" with
git update-index --skip-worktree.Putting it together, I have a git checkout hook which automates the process.
Works on MacOS, YMMV on linux because xargs can differ.
Bonus: add any post-worktree-setup operations at the end (copy node modules, etc).
Use case: headless/server agent environment
Running Claude Code as a personal assistant on a dedicated LXC container (Proxmox). The working directory is
~which is a local git repo specifically to persist Claude Code trust.Despite having the project settings file with
{"isTrusted": true}, the trust prompt appears every single session. This is particularly painful for:bypassPermissions+skipDangerousModePermissionPromptare already configured in global settingsSuggestion: If
isTrusted: trueis set in the project settings ANDdefaultMode: "bypassPermissions"is in global settings, the trust prompt should be skipped entirely. The user has already made their intent crystal clear through configuration.Claude Code v2.1.62 on Linux (Debian LXC).
+1 - This creates unnecessary friction on every startup. I launch Claude Code frequently via a shell alias and having to confirm trust for my home directory every single time is tedious. A
trustedDirectoriesconfig in~/.claude/settings.jsonwould be a simple, welcome fix.I was able to get this to work so far by doin two things:
hasTrustDialogAccepted = trueunder the directory that I am trying to skip the trust prompt on. Mine was set to false.permissions.additionalDirectoriesso Claude Code treats it as a trusted workspace:Afterwards, you might need to trust the directory once but all subsequent launches in that directory will not show a trust prompt.
@depoultry Thanks, this worked for me on macOS. Two small additions in case it helps others:
hasTrustDialogAcceptedalone wasn't enough; theadditionalDirectoriesentry is what stops the prompt from returning on relaunch.~is not expanded inadditionalDirectories. I had"~"there and it silently did nothing. Use an absolute path:``
json
``{ "permissions": { "additionalDirectories": ["/Users/<username>/<dir>"] } }
~/.claude.jsonin one shot:``
bash
``jq '.projects |= with_entries(.value.hasTrustDialogAccepted = true)' \
~/.claude.json > ~/.claude.json.tmp && mv ~/.claude.json.tmp ~/.claude.json
As of 2026-07-03 and Claude Code version 2.1.199 on MacOS, setting
~/.claude.json > projects > /Users/myuser > hasTrustDialogAcceptedtotrueworks. I created a gist to make this easier: https://gist.github.com/kym6464/587c0acf4991eae0ba3df213a02999a0