Bug: PreToolUse Hooks Skipped - "Workspace Trust Not Accepted"
Resolved 💬 5 comments Opened Nov 21, 2025 by iamadalek Closed Jan 28, 2026
Bug: PreToolUse Hooks Skipped - "Workspace Trust Not Accepted"
Version: 2.0.49 | Platform: macOS | Related: #9113, #11519
Problem
PreToolUse hooks are silently skipped with debug message "workspace trust not accepted" even when:
- Trust dialog was accepted
hasTrustDialogAccepted: trueis set in~/.claude.json- Hook is visible and registered in
/hooksmenu
Debug Evidence
[DEBUG] executePreToolHooks called for tool: Write
[DEBUG] Getting matching hook commands for PreToolUse with query: Write
[DEBUG] Found 1 hook matchers in settings
[DEBUG] Matched 1 unique hooks for query "Write" (1 before deduplication)
[DEBUG] Skipping PreToolUse:Write hook execution - workspace trust not accepted
What We Tried (ALL FAILED)
- Disabling all plugins
- Removing
permissions.allowlist from settings - Disabling/removing
settings.local.json - Testing user-level vs project-level hooks separately
- Setting
hasTrustDialogAccepted: falseto re-trigger prompt (no prompt appeared!) - Deleting entire project entry from
~/.claude.json - Creating fresh project entry with
hasTrustDialogAccepted: true - Verified hook script works correctly when tested manually (exits code 2)
Only Workaround That Works: Rename Repository
cd ~/projects
mv my-repo my-repo-temp # Start Claude in new path - hooks work!
mv my-repo-temp my-repo # Bug returns immediately
The same codebase, same config, same hook script - only the path matters.
Theory: Server-Side Trust State
We believe trust state is stored server-side (tied to account + workspace path), not just locally. Evidence:
- All local config changes have zero effect
- Deleting local project entries doesn't help
- Only changing the path works (new path = new workspace server-side)
This would explain why local troubleshooting is futile.
Requests
- Investigate server-side trust - If stored server-side, provide a way to reset it
- Add
/trustcommand - Allow users to explicitly reset/re-trigger trust evaluation - Better visibility - Show when hooks are skipped in the UI, not just debug logs
Time Investment
~4 hours debugging across multiple sessions before discovering the rename workaround.
Minimal Reproduction
- Have a workspace where this bug manifests (unclear how it gets into this state)
- Configure PreToolUse hook in settings.json
- Run
claude --debug - Trigger a Write operation
- Check debug logs for "workspace trust not accepted"
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗