[BUG] Trust prompt appears every session when running Claude Code from home directory (~)

Resolved 💬 3 comments Opened Jan 18, 2026 by coygeek Closed Feb 28, 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 from the home directory (~), a trust prompt appears:

Do you trust the files in this folder?

/Users/user

Claude Code may read, write, or execute files contained in this directory.
This can pose security risks, so only use files, hooks, bash commands,
and environment variables from trusted sources.

Execution allowed by:

• .claude/settings.json

❯ 1. Yes, proceed
  2. No, exit

This prompt does not appear when running claude from any other directory (e.g., ~/Desktop).

The prompt appears because Claude Code detects .claude/settings.json in the current working directory and treats it as project settings requiring trust verification—even though ~/.claude/settings.json is the user's global settings file.

What Should Happen?

Running claude from the home directory should not trigger a trust prompt. The file ~/.claude/settings.json is the user's global settings file and should be implicitly trusted, not treated as untrusted project settings.

Error Messages/Logs

Steps to Reproduce

  1. Have hooks configured in ~/.claude/settings.json
  2. Run: cd ~ && claude
  3. Observe trust prompt appearing
  4. Exit and run: cd ~/Desktop && claude
  5. Observe no trust prompt

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.12

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Root Cause

When $CWD is ~, Claude Code loads ~/.claude/settings.json twice:

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

Since the file is detected as "project settings", it triggers the workspace trust verification prompt.

Workaround

Edit ~/.claude.json and add these flags to the home directory entry:

"/Users/user": {
  "hasTrustDialogAccepted": true,
  "hasTrustDialogHooksAccepted": true,
  ...
}

This manually sets the trust flags, eliminating the prompt.

View original on GitHub ↗

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