
Claude Code stops to ask permission before every shell command. Here's the two-line fix.
If you've used Claude Code for more than an hour, you've hit this: you ask it to do something, it starts, then stops to ask if it can run ls or cat or npm install . You say yes. It runs one command and stops again. This is the default behavior. It's not a bug. But it makes autonomous work basically impossible. There are two places to fix it, and you probably want both. Fix 1: settings.json In your project root (or ~/.claude/ ), add or update .claude/settings.json : { "defaultMode" : "acceptEdits" } This tells Claude Code to accept file edits without asking. For shell commands, add: { "defaultMode" : "acceptEdits" , "bash" : { "allowedCommands" : [ "*" ] } } The allowedCommands: ["*"] wildcard is the aggressive version — Claude runs any shell command without prompting. For projects where you want more control, list specific commands instead: ["npm", "git", "ls", "cat", "grep"] . Fix 2: CLAUDE.md Settings handle the permission layer, but Claude also has an instruction-following layer. If
Continue reading on Dev.to
Opens in a new tab



