{"version":"2.1.305","anchor":"bash-mode-input-in-sdkheadless-path-with-a-client-bash-com","canonical_anchor":"bash-mode-input-in-sdkheadless-path-with-a-client-bash-com","heading":"! shell commands get their own path in SDK input and are refused in the cloud-session view","tier":"use","area":"SDK","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305\/e\/bash-mode-input-in-sdkheadless-path-with-a-client-bash-com","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305","markdown":"### `!` shell commands get their own path in SDK input and are refused in the cloud-session view\n\nBash-mode `!` input now travels with `inputMode` and `clientBashCommandCwd` in SDK input, and is refused with a message in a remote cloud-session view\n\n**Unclear.** It is not clear which clients send shell command input this way or whether you can use it.\n\n**What**\n\nIn Claude Code, typing `!` before a line runs it as a shell command (bash mode) instead of sending it to Claude. This release changes how that input is handled in two places.\n\n- SDK and headless input: the SDK is the programming interface for driving Claude Code from other programs, and headless means running without the interactive screen. Input with `inputMode === \"bash\"` is now handled separately. It skips prompt-submit hooks (your own scripts that normally run when a prompt is sent), uses different replay and acknowledgement handling, and accepts `clientBashCommand` and `clientBashCommandCwd` parameters.\n\n- Submitted payload: `inputMode` and `clientBashCommandCwd` are added to what is sent, set only for client bash commands.\n\n- Remote view: when the session is remote and the input is in bash mode, the terminal interface refuses to send it and shows \"'!' commands can't be sent to a cloud session from this view; open the session to try it there\". Before, nothing stopped it.\n\n**Why**\n\nIf you type `!cmd` while looking at a cloud session, you now get a clear refusal and a pointer to where it will work, instead of the command failing quietly or going somewhere unexpected.\n\n- Area: SDK\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}