[Bug] /auto-mode-setup fails with removeFromPermissionsAllow[6] is not a rule string the removal offer could have produced
Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 18, 2026
Running /auto-mode-setup consistently fails during the scan phase with:
Auto-mode setup scan failed: removeFromPermissionsAllow[6] is not a rule string the removal offer could have produced.
Steps to reproduce:
- Have a large permissions.allow array in ~/.claude/settings.json (in my case, ~1,400 entries accumulated over time).
- Run /auto-mode-setup.
- It gets to "Gathering data and drafting your auto-mode setup" then fails with the error above.
Troubleshooting done:
- Verified permissions.allow is valid — all entries are non-empty strings, no duplicates, no malformed JSON.
- Index 6 in the array is a completely ordinary valid rule string ("Bash(python3 -m py_compile ...)").
- Removed ~105 entries from the array (down to 1,304) as an unrelated cleanup and reran /auto-mode-setup — it failed with the exact same error and index (6), even though the array's contents changed substantially.
Conclusion: The failure doesn't correlate with actual array contents at index 6, which suggests the bug is in the command's internal "removal offer" computation itself (e.g., an index mismatch between a filtered/derived list and the raw permissions.allow array), not something caused by user data.
Environment: macOS (Darwin 25.6.0), Claude Code CLI.