claude-code
claude-code copied to clipboard
[BUG] Multi-line bash commands saved as full permission entries, corrupting settings.local.json
Description
When a user approves a multi-line bash command (like gh issue create with a heredoc body), Claude Code saves the entire command including the multi-line body as a permission entry in settings.local.json, instead of just the command prefix.
This corrupts the settings file and causes parsing errors on next session.
Steps to Reproduce
- Run a command like:
gh issue create --repo foo/bar --title "Title" --body "$(cat <<'EOF'
Multi-line
body
here