Allow configuring or disabling the multi-line command newline safety prompt
Problem
When running with --dangerously-skip-permissions, the built-in "Command contains newlines that could separate multiple commands" prompt still fires on every multi-line Bash command. This cannot be configured or disabled via settings.json.
This is especially disruptive when sub-agents (e.g., browser-testing, code-reviewer, explore agents) generate multi-line commands — the user has no control over how those agents construct commands, so they must manually approve each one.
Examples of commands that trigger the prompt
- Two
findcommands separated by a newline - Two
grepcommands with a comment line between them - Inline Python/Bash scripts using heredoc (
<<'PYEOF') forloops withdo/doneblocks- Any chained shell commands split across lines
In a single session with sub-agents, this prompt can fire 10-20+ times, each requiring manual approval.
Request
Add a configuration option to suppress this prompt, for example:
// settings.json
{
"allowMultilineBashCommands": true
}
At minimum, this should be respected when --dangerously-skip-permissions is already active — the user has explicitly opted into reduced safety guardrails.
Use Case
- Sub-agents frequently chain
find,grep, or inline scripts with newlines - In a trusted local dev environment with bypass mode enabled, these prompts add friction without security benefit
- Users running agent teams (multiple sub-agents) get blocked repeatedly waiting for manual approval on benign multi-line commands
Environment
- macOS (Darwin 25.3.0)
- Claude Code with
--dangerously-skip-permissions - Multiple MCP servers and sub-agents active
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗