Allow configuring or disabling the multi-line command newline safety prompt

Resolved 💬 3 comments Opened Mar 2, 2026 by kumaran-is Closed Mar 6, 2026

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 find commands separated by a newline
  • Two grep commands with a comment line between them
  • Inline Python/Bash scripts using heredoc (<<'PYEOF')
  • for loops with do/done blocks
  • 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

View original on GitHub ↗

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