Add setting to disable multi-line command confirmation prompt
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. longfindcommands) - Inline scripts via
python3 -c "..."ornode -e "..." - Commands with inline
# commentson 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:
find ... \( -name "*.png" -o -name "*.webp" \) | sort(line continuation)python3 -c "import re; ..."(inline multi-line scripts)grep '...' file | head -1with 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗