Inconsistency: parent-dir trust skips the trust dialog but not the .mcp.json approval gate

Status Open
Reported on v2.1.197
Maintainer reply None cached
Activity 1 comment · opened Jul 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

Environment

  • Claude Code 2.1.197 (behavior matches the v2.1.196 change described below)
  • Linux (WSL Ubuntu 22.04)

What's Wrong?

Workspace trust is evaluated inconsistently between two features, so a new project created under an already‑trusted parent directory shows the MCP server approval prompt without ever showing a trust dialog — leaving the user no way to satisfy the exact‑path trust that the committed pre‑approval depends on.

  • The trust dialog is skipped when the project folder or a parent directory is already trusted.
  • The .mcp.json pre‑approval from a project's committed .claude/settings.json (enabledMcpjsonServers) requires trust recorded for the exact project path — the v2.1.196 "a cloned repository can't approve its own servers" change.

Under a trusted parent, the first rule suppresses the dialog while the second still treats the folder as untrusted, so an enabledMcpjsonServers list committed for a team never takes effect for projects created there. This is a consistency issue between the two rules, not a trust bypass — approving still requires an explicit user action.

What Should Happen?

Either behavior would be self‑consistent:

  1. If parent‑directory trust suppresses the trust dialog, treat the folder as trusted for the settings‑based .mcp.json approvals too; or
  2. If exact‑path trust is required for those approvals, show the trust dialog in this situation so the user can grant it.

Currently neither holds: the dialog is suppressed by parent trust, but the approval gate demands exact‑path trust, producing a dead end.

Steps to Reproduce

  1. Trust a parent directory (open Claude in ~/work once and accept the trust dialog).
  2. Create a new project under it, ~/work/proj, containing a .mcp.json that defines a server and a committed .claude/settings.json with {"enabledMcpjsonServers":["<server>"]}.
  3. cd ~/work/proj && claude mcp get <server>Status: ⏸ Pending approval, despite the committed pre‑approval.
  4. Run claude interactively in ~/work/proj: no trust dialog appears (the parent is trusted), but the MCP server approval prompt does.
  5. Grant trust for the exact path ~/work/proj instead → the same files now show Status: ✔ Connected with no prompt, confirming that only the trust‑scope evaluation differs between the two features.

Error Messages/Logs

Ignoring N permissions.allow entries from .claude/settings.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["…/proj"].hasTrustDialogAccepted: true in ~/.claude.json.

Additional note

Approving at the prompt writes enabledMcpjsonServers to .claude/settings.local.json, which is honored without trust on 2.1.197. That also seems inconsistent with how the committed .claude/settings.json list is treated under the same trust state.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗