[BUG] Hooks skipped due to workspace trust when running from home directory (~)

Resolved 💬 4 comments Opened Dec 7, 2025 by jasper-vandemalle Closed Feb 27, 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 running Claude Code from the home directory (~), all hooks are skipped with "workspace trust not accepted", even though they are defined in user-level settings (~/.claude/settings.json).

When $CWD is ~, the file ~/.claude/settings.json is loaded twice:

  1. As user settings (always ~/.claude/settings.json)
  2. As project settings ($CWD/.claude/settings.json which resolves to the same file)

The deduplication logic correctly handles skills, but hooks still fail the workspace trust check.

What Should Happen?

Hooks defined in user settings should always be trusted. When user and project settings resolve to the same file, hooks should not require additional workspace trust.

Error Messages/Logs

Watching for changes in setting files /home/user/.claude/settings.json, /home/user/.claude/settings.json, ...

Skipping duplicate skill 'skill-a' from projectSettings (same file as earlier source)
Skipping duplicate skill 'skill-b' from projectSettings (same file as earlier source)
Deduplicated 2 duplicate skills

Skipping SessionStart:startup hook execution - workspace trust not accepted
Skipping SubagentStart:Explore hook execution - workspace trust not accepted
Skipping UserPromptSubmit hook execution - workspace trust not accepted
Skipping PreToolUse:Read hook execution - workspace trust not accepted

Steps to Reproduce

  1. Configure hooks in ~/.claude/settings.json (user settings)
  2. Run claude -d hooks from the home directory (cd ~ && claude -d hooks)
  3. Observe debug output showing hooks being skipped due to "workspace trust not accepted"

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.60 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

This may be related to the fix for #3465 (which addressed hooks firing twice). The deduplication now works for skills but the trust check for hooks wasn't updated to handle this edge case.

Workaround: Run Claude Code from any directory other than ~.

View original on GitHub ↗

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