Preflight Checklist
What's Wrong?
When you typically start normal claude in a new folder, you get a warning like:
> claude
Do you trust the files in this folder?
/Users/PERSON/data/newFolder
Claude Code may read, write, or execute files contained in this directory. This can pose security risks, so
only use files from trusted sources.
Learn more ( https://docs.claude.com/s/claude-code-security )
❯ 1. Yes, proceed
2. No, exit
Enter to confirm · Esc to exit
However, if you go into a new folder and run claude --dangerously-skip-permissions, it will skip the folder trust check, but it will not mark the folder as trusted.
What Should Happen?
Either Claude Code should still ask you whether you trust the folder in --dangerously-skip-permissions mode, or the folder/workspace should automatically be marked as trusted when running in that mode.
All hooks and plugins should then work in the new folder, even if you've only ever run Claude with --dangerously-skip-permissions in that folder.
Error Messages/Logs
From the debug logging:
84:[DEBUG] Skipping SessionStart:startup hook execution - workspace trust not accepted
124:[DEBUG] Trust not accepted for current directory - skipping plugin installations
162:[DEBUG] Skipping SubagentStop hook execution - workspace trust not accepted
167:[DEBUG] Skipping UserPromptSubmit hook execution - workspace trust not accepted
1057:[DEBUG] Skipping Stop hook execution - workspace trust not accepted
Steps to Reproduce
- Create a hook to run on STOP, such as:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "echo 'hello'"
}
]
}
]
}
}
- Create a new folder inside of which Claude Code has never been launched
- Launch Claude Code with
claude --dangerously-skip-permissions --debug. Notice the folder trust prompt is never shown.
- Give it a test prompt, and let it respond and stop
- Check debug logs for skipped hook checks
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.27
Platform
Other
Operating System
macOS
Terminal/Shell
Warp
Additional Information
No response
Preflight Checklist
What's Wrong?
When you typically start normal
claudein a new folder, you get a warning like:However, if you go into a new folder and run
claude --dangerously-skip-permissions, it will skip the folder trust check, but it will not mark the folder as trusted.What Should Happen?
Either Claude Code should still ask you whether you trust the folder in
--dangerously-skip-permissionsmode, or the folder/workspace should automatically be marked as trusted when running in that mode.All hooks and plugins should then work in the new folder, even if you've only ever run Claude with
--dangerously-skip-permissionsin that folder.Error Messages/Logs
From the debug logging: 84:[DEBUG] Skipping SessionStart:startup hook execution - workspace trust not accepted 124:[DEBUG] Trust not accepted for current directory - skipping plugin installations 162:[DEBUG] Skipping SubagentStop hook execution - workspace trust not accepted 167:[DEBUG] Skipping UserPromptSubmit hook execution - workspace trust not accepted 1057:[DEBUG] Skipping Stop hook execution - workspace trust not acceptedSteps to Reproduce
claude --dangerously-skip-permissions --debug. Notice the folder trust prompt is never shown.Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.27
Platform
Other
Operating System
macOS
Terminal/Shell
Warp
Additional Information
No response