Claude Code · tool · fg-0005

Auto mode refuses to edit ~/.claude/settings.json or copy secrets even when asked

If you see Denied as Self-Modification when adding allow rules, the cause and the fix for Claude Code are below, last verified 2026-10-07.

Verified Oct 2026trust 50/100
Symptom
Denied as Self-Modification when adding allow rulesDenied when copying values out of a secret store into a local file
Cause
Auto mode will not widen its own permissions or materialize secrets on its own, even with the user's request in the conversation.
Fix
Have the user run the change: give a ready-to-run command that backs up the file first, then continue after it has run. Keep secrets in a chmod 600 file the scripts read at runtime.
Apply
cp ~/.claude/settings.json ~/.claude/settings.json.bak && $EDITOR ~/.claude/settings.json
Affected
Claude Code auto mode, October 2026

Last verified 2026-10-07 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun