The whole hunk
from line 324, old and new numbered
/
lines
from line 324
324324* Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt
325325* Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior
326326
327In a regular interactive session, commands you type in shell mode run outside the [sandbox](/docs/en/sandboxing) even when you've enabled sandboxing, because the sandbox applies to the commands Claude runs. See [strict sandbox mode](/docs/en/sandboxing#the-unsandboxed-retry-escape-hatch) for the sessions where shell-mode commands run sandboxed too, such as background sessions with strict sandbox mode on.
328
327329Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](/docs/en/settings-reference#respondtobashcommands) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response.
328330
329331## Queue messages while Claude works