{"version":"2.1.315","anchor":"bash-tool-can-carry-command-text-into-the-shell-snapshot-pat","canonical_anchor":"bash-tool-can-carry-command-text-into-the-shell-snapshot-pat","heading":"Bash tool can pass command text to the shell a new way, with a fallback","tier":"internal","area":"Bash Tool","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315\/e\/bash-tool-can-carry-command-text-into-the-shell-snapshot-pat","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315","markdown":"### Bash tool can pass command text to the shell a new way, with a fallback\n\nClaude Code's Bash tool can now carry the command text into the shell separately in one no-sandbox case, and falls back if the shell rejects it\n\n**Unclear.** It is not clear what triggers the new path or what it changes in how a command behaves.\n\n**What**\n\nThe Bash tool is how Claude runs commands in a terminal shell for you. Before this release, Claude Code always handed the shell the command as a string for the shell to evaluate. It can now \"carry\" the command text into the shell another way:\n\n- `buildExecCommand`, the step that builds the shell launch, now returns `carriedCommandText`, and that text is passed into the environment the shell is started with. The command text can also be added to the shell's startup arguments.\n\n- The carrier is used only in one case: no sandbox (the restricted environment Claude Code can run commands in), no scrubbing of credentials from the environment, and a shell snapshot (a saved copy of your shell's setup) is present. In that case an extra setup step is added in front of the command and a different evaluation step runs.\n\n- If the shell exits with code 126 and a matching error, Claude Code calls `stopCarryingCommandText`, stops using the carrier, and records that the carrier was lost.\n\n- A `noBashEnv` option is also passed, set to true when `BASH_ENV` is not set. `BASH_ENV` is an environment variable that names a file bash runs when it starts.\n\nThe Bash tool's own description, as shown to Claude, is 10,545 characters at its longest in the capture taken under this release, unchanged from the release before.\n\n**Why**\n\nThis changes how commands reach the shell in that one setup, so it can affect how a command is run. If a shell refuses the new form with exit code 126, Claude Code switches back to the old method on its own.\n\n- Area: Bash Tool\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}