Preflight Checklist
Note: This was previously reported in #993 and #21283, both auto-closed without resolution. A comment on #993 suggested additionalDirectories as a workaround — I've tested this and confirmed it does not skip the workspace trust prompt (tested with absolute paths, ~ expansion, and wildcard patterns).
Problem Statement
When using git worktrees, every new worktree creates a new directory that Claude Code has never seen before. This triggers the workspace trust prompt ("Quick safety check: Is this a project you created or one you trust?") every single time.
For developers who use worktrees heavily (one worktree per feature branch), this becomes repetitive friction. The parent repository is already trusted, and all worktrees are derived from it — there's no security benefit in re-prompting for each one.
Proposed Solution
Add a trustedWorkspacePatterns (or similar) setting in ~/.claude/settings.json that accepts glob patterns for directories that should be automatically trusted:
{
"trustedWorkspacePatterns": [
"~/worktrees/my-project/*",
"~/repos/**"
]
}
When Claude Code launches in a directory matching any of these patterns, the trust prompt would be skipped.
Alternative Solutions
-
additionalDirectories: Tested all of the following in global ~/.claude/settings.json — none skip the trust prompt:
- Absolute path:
/Users/me/worktrees/my-project
- Tilde path:
~/worktrees/my-project
- Absolute with wildcard:
/Users/me/worktrees/my-project/*
- Tilde with wildcard:
~/worktrees/my-project/*
This setting only controls file access scope from within an already-trusted session — it does not affect the initial workspace trust prompt.
-
--dangerously-skip-permissions: Disables all permission checks, not just the trust prompt. Overkill for this use case.
-
-p flag: Skips trust but only works in non-interactive mode.
-
Manually confirming each time: Current workaround, but adds unnecessary friction on every new worktree.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
- Developer works on a monorepo at
~/repos/my-project/
- They create worktrees via
git worktree add ~/worktrees/my-project/feature-xyz feature-xyz
- They run
claude in the new worktree directory
- Currently: trust prompt appears every time for each new worktree
- With this feature: directories under
~/worktrees/my-project/* would be auto-trusted via a glob pattern
Additional Context
Preflight Checklist
Problem Statement
When using git worktrees, every new worktree creates a new directory that Claude Code has never seen before. This triggers the workspace trust prompt ("Quick safety check: Is this a project you created or one you trust?") every single time.
For developers who use worktrees heavily (one worktree per feature branch), this becomes repetitive friction. The parent repository is already trusted, and all worktrees are derived from it — there's no security benefit in re-prompting for each one.
Proposed Solution
Add a
trustedWorkspacePatterns(or similar) setting in~/.claude/settings.jsonthat accepts glob patterns for directories that should be automatically trusted:{ "trustedWorkspacePatterns": [ "~/worktrees/my-project/*", "~/repos/**" ] }When Claude Code launches in a directory matching any of these patterns, the trust prompt would be skipped.
Alternative Solutions
additionalDirectories: Tested all of the following in global~/.claude/settings.json— none skip the trust prompt:/Users/me/worktrees/my-project~/worktrees/my-project/Users/me/worktrees/my-project/*~/worktrees/my-project/*This setting only controls file access scope from within an already-trusted session — it does not affect the initial workspace trust prompt.
--dangerously-skip-permissions: Disables all permission checks, not just the trust prompt. Overkill for this use case.-pflag: Skips trust but only works in non-interactive mode.Manually confirming each time: Current workaround, but adds unnecessary friction on every new worktree.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
~/repos/my-project/git worktree add ~/worktrees/my-project/feature-xyz feature-xyzclaudein the new worktree directory~/worktrees/my-project/*would be auto-trusted via a glob patternAdditional Context
additionalDirectoriessuggestion from Support whitelisting trusted directories independent of where Claude is started #993 has been independently verified as not solving this problem across multiple path formats