Skip to content

Claude Code

Claude Code settings and permissions: what it does without asking

Claude Code's three settings files, allow, ask and deny rules for tools and commands, why .env is always denied, and the permission modes including plan mode.

Talqeen wrote this article and no editor has reviewed it yet. Search engines do not see this page until it is reviewed.

Claude Code reads and edits files and runs commands. Each action can ask you, run without asking, or be denied. Permissions decide which, so you do not waste time approving file reads and no dangerous command slips past you.

Where settings live

.claude/settings.json in the repository (team settings, committed); .claude/settings.local.json (yours for this project, not committed); ~/.claude/settings.json (yours everywhere). /permissions shows and edits the active rules.

Three kinds of rules

{
  "permissions": {
    "allow": ["Bash(pnpm test:*)", "Bash(git diff:*)"],
    "ask": ["Bash(git push:*)"],
    "deny": ["Read(./.env)", "Read(./.env.*)", "Read(./**/*.pem)"]
  }
}

allow runs without asking (tests, lint, reading git history); ask asks every time (pushing, deploying); deny never runs, and deny wins over allow. A rule names the tool and, in parentheses, what it applies to: Bash(pnpm test:*) is every command starting with pnpm test.

Always deny

Environment files at every level, key and certificate files such as *.pem and *.key, and commands that print the environment such as printenv. The Talqeen kit always writes these rules into settings.json.

MCP permissions

MCP tools are named in rules too. In the Talqeen kit, the read tools of your project server run without asking; write tools such as updating a task or closing a phase ask every time, and so does generating a prompt, since it may use your quota.

Permission modes

Shift+Tab cycles between them: default (asks by the rules), accept edits (edits files without asking, still asks for commands), and plan mode (reads, analyses and proposes a plan, changes nothing). Start every large or unclear task in plan mode.

Tips

Start strict and widen slowly; never allow something as broad as Bash(*); review settings.json in pull requests like code.