Add setting to disable multi-line command confirmation prompt

Resolved 💬 3 comments Opened Feb 28, 2026 by mwh-aparavi Closed Mar 4, 2026

Problem

When Claude Code generates Bash commands that contain newlines (multi-line commands), it always triggers a confirmation prompt regardless of the user's permission settings. This includes:

  • Commands with \ line continuations (e.g. long find commands)
  • Inline scripts via python3 -c "..." or node -e "..."
  • Commands with inline # comments on separate lines

The warning says "Command contains newlines that could separate multiple commands" or "Command contains process substitution" and asks for confirmation.

This cannot be bypassed via permissions.allow in settings.json — even if the command (e.g. find, grep, python3) is explicitly allowed, the multi-line safety check fires independently.

Impact

This significantly disrupts workflow for power users who have already configured broad permissions. Common patterns that trigger it:

  1. find ... \( -name "*.png" -o -name "*.webp" \) | sort (line continuation)
  2. python3 -c "import re; ..." (inline multi-line scripts)
  3. grep '...' file | head -1 with a description comment above

Users who have set Bash(find:*), Bash(python3:*), etc. in their allow list expect these to run without confirmation.

Proposed Solution

Add a setting to disable this check, e.g.:

{
  "permissions": {
    "allowMultilineCommands": true
  }
}

Or alternatively, respect the existing allow list — if the primary command is allowed, skip the newline safety check.

Environment

  • macOS (Darwin 25.2.0)
  • Claude Code CLI

View original on GitHub ↗

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