You set permissions.defaultMode in one settings file, restart Claude Code, and a different mode is active. Nothing is broken — another file won.
Claude Code reads settings from up to five places, and when the same key appears in more than one, a fixed precedence decides which value applies. Most "my setting doesn't work" reports are really precedence questions. Here's the whole model, verified against the official settings docs as of Claude Code 2.1.22x.
The five layers
From highest priority to lowest:
Managed settings — deployed by an organization (server-delivered, MDM/OS policy, or a system-level managed-settings.json). Nothing below can override these, with a handful of deliberate security exceptions I'll get to.







