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

Resolved 💬 3 comments Opened Jan 16, 2026 by ThatDragonOverThere Closed Jan 20, 2026

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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗