Inconsistency: parent-dir trust skips the trust dialog but not the .mcp.json approval gate
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.jsonpre‑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:
- If parent‑directory trust suppresses the trust dialog, treat the folder as trusted for the settings‑based
.mcp.jsonapprovals too; or - 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
- Trust a parent directory (open Claude in
~/workonce and accept the trust dialog). - Create a new project under it,
~/work/proj, containing a.mcp.jsonthat defines a server and a committed.claude/settings.jsonwith{"enabledMcpjsonServers":["<server>"]}. cd ~/work/proj && claude mcp get <server>→Status: ⏸ Pending approval, despite the committed pre‑approval.- Run
claudeinteractively in~/work/proj: no trust dialog appears (the parent is trusted), but the MCP server approval prompt does. - Grant trust for the exact path
~/work/projinstead → the same files now showStatus: ✔ Connectedwith 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗