blog.salamander.mobi

How to reduce the annoying approvals in Claude Code

3. mars 2026 · 2 min

If you're like me, your mood when using Claude Code is probably deterioating proportionally with the number of times Claude Code is asking you to confirm that you want it to perform some benign commands. These are annoying by themselves, but it definitely doesn't help that even though you keep choosing the "Yes, and don't ask again for XYZ", it quite often asks again for exactly that command. Sometimes it is because it chains some commands together and the next command in the chain is one you haven't yet approved. But sometimes it just seems to be bugged.

You can greatly reduce the number of times you have to confirm you want CC to perform such commands by instructing CC through the global config that you are pre-approving a list of commands. I started such a list by asking CC to add a list of pre-approved commands containing all non-destructive commands for various things. This list has been gradually extended as I encounter more such commands that I have to confirm. When CC is finished with whatever process we're in the middle of, I tell it:

Add any non-destructive command you've asked me to confirm in this session to the list of pre-approved commands in the global config

Give this a go, and in a few days you'll have dramatically reduced these annoying confirmation prompts.

Implementation

First, add this section to your global .claude/CLAUDE.md (or ask CC to do it for you):

### Bash Commands

Always use separate Bash tool calls instead of chaining commands with &&, ||, or ;. Claude Code's permission system matches against the entire command string, so chaining breaks allow list pattern matching even when each individual command is covered.

Unfortunately, the allow list patterns do not match whenever Claude chains commands, which it often does, and so we want Claude to not optimize in this way and rather call each command separately. This way, it will only stop and prompt you whenver it wants to perform an action that really isn't in your allow list.

Second, (ask CC to) add this to your global .claude/settings.json:

{
  "permissions": {
    "allow": [
      "Read",
      "Glob",
      "Grep",
      "Edit",
      "Write",
      "WebFetch",
      "WebSearch",
      "Bash(git status)",
      "Bash(git diff*)",
      "Bash(git log*)",
      "Bash(git show*)",
      "Bash(git branch*)",
      "Bash(git remote*)",
      "Bash(git tag*)",
      "Bash(git stash list*)",
      "Bash(ls*)",
      "Bash(cat*)",
      "Bash(head*)",
      "Bash(tail*)",
      "Bash(wc*)",
      "Bash(stat*)",
      "Bash(file*)",
      "Bash(du*)",
      "Bash(df*)",
      "Bash(pwd)",
      "Bash(which*)",
      "Bash(uname*)",
      "Bash(ps*)",
      "Bash(type*)",
      "Bash(echo*)",
      "Bash(sort*)",
      "Bash(uniq*)",
      "Bash(jq*)",
      "Bash(brew list*)",
      "Bash(brew info*)",
      "Bash(npm list*)",
      "Bash(gh pr list*)",
      "Bash(gh pr view*)",
      "Bash(gh issue list*)",
      "Bash(gh issue view*)",
      "Bash(gh repo view*)",
      "Bash(gh run list*)",
      "Bash(gh run view*)",
      "Bash(find*)",
      "Bash(grep*)",
      "Bash(sed -n*)",
      "Bash(python3 -m json.tool*)",
      "Bash(qmk compile*)",
      "Bash(mkdir*)"
    ]
  },
  "enabledPlugins": {
    "gopls-lsp@claude-plugins-official": true,
    "kotlin-lsp@claude-plugins-official": true,
    "clangd-lsp@claude-plugins-official": true
  }
}