PrepGenAICerts

settings.json as the Deterministic Control Surface

Core

Configure behavior and permissions via settings.json · Difficulty 2/5

0%
settings-jsonpermissionshooksdeterministic-controls

Explanation

What settings.json Configures

settings.json -- at ~/.claude/settings.json for the user level and .claude/settings.json at the project level -- configures behavior and permissions:

  • Which tools are allowed or denied
  • Hook definitions (code that runs at defined points in the agent loop)
  • Environment variables
  • Model selection
  • MCP servers

Why It's Deterministic

settings.json is the deterministic control surface: an allow/deny rule or a hook defined here can block a dangerous command regardless of what the model proposes. This matters because prompt-level instructions (e.g., a line in a system prompt telling Claude not to run destructive commands) are probabilistic -- the model generally follows them but compliance is not guaranteed. settings.json enforces the boundary structurally, outside the model's discretion, which is why it is the right place for permission scoping and hook-based guardrails on high-stakes or destructive actions.

settings.json vs. CLAUDE.md

The two files solve different problems and are not interchangeable:

CLAUDE.mdsettings.json
NatureContext/memory loaded into the model's promptExecutable configuration enforced outside the model
ContainsConventions, architecture notes, commands, gotchasTool allow/deny lists, hooks, env vars, model choice, MCP servers
ComplianceProbabilistic (the model reads and generally follows it)Deterministic (enforced structurally)

Common exam traps

  • Putting permission rules, hooks, or tool allow/deny lists in `CLAUDE.md -- these belong in settings.json. CLAUDE.md is read by the model as context; it cannot structurally block an action the way a settings.json` rule or hook can.
  • Assuming a well-written CLAUDE.md instruction ("never run destructive commands") is an adequate substitute for a settings.json permission rule -- the former is a probabilistic nudge, the latter a deterministic gate.

Key Takeaways

  • settings.json (user: ~/.claude/settings.json, project: .claude/settings.json) configures tool permissions, hooks, env vars, model selection, and MCP servers
  • settings.json is the deterministic control surface -- an allow/deny rule or hook blocks an action regardless of what the model proposes
  • CLAUDE.md is context/memory (probabilistic influence on the model); settings.json is executable configuration (deterministic enforcement)
  • Permission and hook rules belong in settings.json, never in CLAUDE.md

Glossary Terms

Related Concepts

PrepGenAICerts.com is an independent third-party exam-prep platform for the Claude Certified Architect (CCA-F) certification. We are not affiliated with, endorsed by, or acting on behalf of Anthropic PBC.

Note: New premium upgrades are temporarily paused while we resolve an issue with our payment provider. Existing premium members retain full access.