[BUG] Using dangerously-skip-permissions on a new folder skips trust check and breaks hooks

Resolved 💬 10 comments Opened Oct 27, 2025 by christophercolumbusdog Closed Jan 22, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

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

  1. Create a hook to run on STOP, such as:
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "echo 'hello'"
          }
        ]
      }
    ]
  }
}
  1. Create a new folder inside of which Claude Code has never been launched
  2. Launch Claude Code with claude --dangerously-skip-permissions --debug. Notice the folder trust prompt is never shown.
  3. Give it a test prompt, and let it respond and stop
  4. 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_

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗