Bug: Auto-added permissions contain malformed multi-line git commit commands instead of wildcard patterns
Resolved 💬 3 comments Opened Jan 1, 2026 by slyckmb Closed Feb 16, 2026
Description
Claude Code's auto-permission system is adding malformed permission entries that contain entire git commit commands with multi-line commit messages, instead of creating proper wildcard patterns. This causes the settings parser to fail on startup.
What Happened
After using Claude Code for git commits, the .claude/settings.local.json file contained entries like:
"Bash(git -C /home/michael/dev/work/glider/glider-docker commit -m \"$\\(cat <<''EOF''\nAdd tracker-ctl Phase 2: Read-only operations complete\n\nImplement CLI skeleton and Prowlarr API integration for read-only\ntracker management operations.\n\nComponents:\n- bin/tracker-ctl.sh: Main CLI with 7 commands \\(315 lines\\)\n...(hundreds more lines of commit message)...\nEOF\n\\)\")"
Error Seen
Settings Error
/home/michael/dev/work/glider/.claude/settings.local.json
└ permissions
└ allow
└ "Bash(git -C /home/michael/dev/work/glider/glider-docker commit -m ...":
Wildcards in the middle of commands are not supported.
Use prefix matching with ":*" or specify exact commands.
Expected Behavior
The auto-permission system should create wildcard patterns like:
"Bash(git commit:*)"
"Bash(git -C /path/to/repo commit:*)"
Instead of capturing the entire command with the full heredoc commit message.
Impact
- Settings file fails to load on startup
- User must manually edit JSON to fix malformed entries
- Multiple duplicate malformed entries accumulate over time
Workaround
Manually replace malformed entries with wildcard patterns in .claude/settings.local.json.
Environment
- Claude Code CLI
- Git commands with heredoc-style commit messages using
git commit -m "$(cat <<'EOF'...)"
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗