claude-code - 💡(How to fix) Fix Feature request: flag to skip workspace trust dialog without bypassing all permissions [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45298Fetched 2026-04-09 08:08:36
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
2
Timeline (top)
labeled ×3closed ×1commented ×1

Fix Action

Fix / Workaround

Current workarounds

RAW_BUFFERClick to expand / collapse

Problem

Every new Claude Code session shows a "Do you trust the files in this folder?" prompt. This prompt does not persist trust across sessions, so it appears every single time, even for the same directory.

This is especially friction-heavy when auto-launching Claude Code from a VS Code terminal profile, where every new terminal triggers the prompt.

Current workarounds

  • --dangerously-skip-permissions skips the trust dialog but also disables all permission prompts (edits, bash commands, etc.), which is too permissive for normal use.
  • There is no flag, setting, or environment variable to skip only the trust dialog while keeping normal permission checks active.

Proposed solution

One or more of:

  1. Persist trust per directory so the prompt only appears once per directory, not once per session.
  2. A CLI flag like --trust-cwd that skips the workspace trust dialog without affecting other permission checks.
  3. A setting like "trustedDirectories": ["/Users/me/GitHub"] in settings.json to pre-trust specific paths or path prefixes.

Option 3 would be ideal as it combines security (explicit allowlist) with convenience (no repeated prompts).

extent analysis

TL;DR

Implementing a setting like "trustedDirectories": ["/path/to/trusted/directory"] in settings.json could allow pre-trusting specific paths without disabling other permission checks.

Guidance

  • Consider adding a CLI flag like --trust-cwd to skip the workspace trust dialog without affecting other permission checks.
  • Evaluate the feasibility of persisting trust per directory to limit the prompt to once per directory.
  • Investigate the possibility of introducing a settings.json configuration option to specify trusted directories, enhancing security and convenience.
  • Assess the trade-offs between security and convenience for each proposed solution to determine the best approach.

Example

No explicit code example is provided due to the lack of specific implementation details in the issue.

Notes

The ideal solution should balance security and convenience, ensuring that permission checks are not overly permissive while minimizing friction for users.

Recommendation

Apply a workaround by introducing a settings.json configuration option, such as "trustedDirectories": ["/path/to/trusted/directory"], as it offers a secure and convenient solution by allowing explicit trust configuration without disabling other permission checks.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature request: flag to skip workspace trust dialog without bypassing all permissions [1 comments, 2 participants]