[BUG] Trust dialog acceptance not persisted to .claude.json

Resolved 💬 3 comments Opened Mar 19, 2026 by samuelblakek Closed Mar 23, 2026

Bug Description

The "trust this directory" dialog acceptance is not being persisted to ~/.claude.json. The hasTrustDialogAccepted field remains false even after accepting the dialog, causing the trust prompt to reappear on every session start for affected directories.

Evidence

Inspecting ~/.claude.json shows that projectOnboardingSeenCount increments correctly (reached 39 for one directory), proving the file is being written to — but hasTrustDialogAccepted stays false. This means the counter write succeeds but the trust flag write does not.

Example from ~/.claude.json:

{
  "/Users/<user>": {
    "hasTrustDialogAccepted": false,
    "projectOnboardingSeenCount": 39,
    "hasCompletedProjectOnboarding": true
  }
}

In this case, 3 out of 19 project directories had the issue (the home directory and 2 project directories). The remaining 16 had hasTrustDialogAccepted: true.

Steps to Reproduce

  1. Open Claude Code in a directory (home directory in my case)
  2. Accept the trust dialog when prompted
  3. Close the session
  4. Inspect ~/.claude.jsonhasTrustDialogAccepted is false for the affected project entry
  5. Open Claude Code again in the same directory — trust dialog reappears

Not 100% reproducible — only affects some directories, not all. Unclear what differentiates the affected ones.

Workaround

Manually setting hasTrustDialogAccepted: true in ~/.claude.json via a script, or using a SessionStart hook to auto-set the flag.

Environment

  • Claude Code version: 2.1.80
  • OS: macOS 15.6.1 (Darwin 24.6.0)
  • Shell: zsh

View original on GitHub ↗

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