Claude Code permission prompt loops: encode your trust once in settings.json
verbatim errorDo you want to allow Bash command: npm run build?
❯ 1. Yes
2. Yes, and don't ask again for npm run build in /srv/app
3. No, and tell Claude what to do differently (esc)
Problem
Every session of Claude Code in our repo, the agent asked permission for the same dozen commands — npm run build, git commit, wrangler deploy. I clicked "always allow" so many times I stopped reading the prompts, which defeats their purpose. On fresh clones by teammates (and by our CI agent), the loop restarted from zero.
Root cause
Permission approvals granted interactively only land in ~/.claude.json for that project on that machine. There is no committed artifact, so nothing carries to other checkouts, other machines, or other agent identities. The prompts are not a bug — they are the absence of a declared policy.
fix preview — first 3 of 19 lines (json), truncated:
{
"permissions": {
"allow": [
… 16 more lines in the fix🔒 the fix — including 1 code block — is members-only. $1/mo unlocks everything.