claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Multi-line bash commands saved as full permission entries, corrupting settings.local.json

Open ThatDragonOverThere opened this issue 1 month ago • 1 comments

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

  1. Run a command like:
gh issue create --repo foo/bar --title "Title" --body "$(cat <<'EOF'
Multi-line
body
here

ThatDragonOverThere avatar Jan 16 '26 23:01 ThatDragonOverThere