All areas Feed Weekly digests

bash

The tracked changes tagged bash, newest release first. Every sentence is an item's summary.

134 items from 27 releases, 16 breaking Sources: Claude Code Last change:

Goes with

Changes

Claude Code v2.1.332

  1. fix

    On Linux, the Bash edit diff no longer shows an unchanged symlink as edited after Claude read the file through it.

  2. fix

    Fixed Esc not stopping a Bash command while it waited for its file diff in large or slow git repositories.

Claude Code v2.1.331

  1. fix

    Fixed sandboxed Bash commands sometimes failing to start on a full temp disk when sandbox file rules keep commands out of the temp directory.

  2. performance

    Windows: Improved the speed of the first Bash command in a session on machines with no custom shell start-up files.

Claude Code v2.1.330

  1. breaking Breaking

    Changed rm commands aimed at the root, home, a top-level folder or the working folder to ask for approval, and refuse them where no one can answer.

  2. fix

    Linux: fixed Bash commands waiting seconds and showing no file diff for the rest of a session in slow repositories with large ignored folders.

  3. fix

    Windows: fixed Bash commands staying slower for the rest of a session after a slow Git Bash start on machines without custom start-up files.

  4. fix

    Fixed pkill -f in self-hosted runner sessions on Linux ending the shell with exit code 144 or the runner itself; the fix needs pkill with --ignore-ancestors.

  5. other

    Self-hosted runner: Bash commands skip the file diff when nothing needs it, so transcripts may lack it; set bashEditDiffEnabled to true in managed settings to get every diff.

Claude Code v2.1.327

  1. breaking Breaking

    Changed permissions.blockReadsOutsideWorkingDirectories to ask about more Bash commands in bypass and auto modes, and to deny some in auto mode.

  2. breaking Breaking

    Changed permissions.blockReadsOutsideWorkingDirectories to refuse more Bash commands that name a path under a Read or Edit deny rule, where it previously asked.

  3. fix

    Fixed the Bash tool's diff not naming changed files that are binary, too large or too many to show.

  4. performance

    Improved the speed of a session's first Bash command; shell start-up files may now run before approval even if refused; set CLAUDE_CODE_DISABLE_SHELL_HEAD_START=1 to turn this off.

  5. performance

    Improved speed of the Bash permission check on very deeply nested missing paths on macOS and Linux, and of secret masking on very long text with a URL.

+1 more
  1. other

    Changed Bash commands whose variables expand to very long text to be denied, with a message to use shorter values or a file.

Claude Code v2.1.326

  1. breaking Breaking

    Claude Code no longer keeps some sandbox state, and Bash may ask first until /sandbox or /cd is run.

  2. breaking Breaking

    Bash commands on macOS that ran before now ask or are refused.

  3. breaking Breaking

    Auto mode stops some shell commands that ran before.

  4. breaking Breaking

    Some cp and mv commands now ask first.

  5. breaking Breaking

    Bash commands with very long values that cannot be fully checked now ask, or are refused where a deny rule may apply.

  6. breaking Breaking

    Bash ask-before-run rules now apply to some lines that set environment variables when auto-allow is off, and unattended runs refuse them.

+9 more
  1. fix

    cp of a file is no longer refused when only its source is covered by an Edit deny rule.

  2. fix

    Bash commands that delete or overwrite files, such as find -delete, cat a > b and sort -o, are no longer summarized in the transcript as a search or read.

  3. fix

    A misleading Dangerous rm operation warning no longer appears in the Bash permission prompt for some commands with no rm.

  4. fix

    grep in the Bash tool no longer silently skips some text files.

  5. fix

    Very long Bash or PowerShell commands and long new files in permission prompts no longer freeze the session for seconds.

  6. fix

    A running command shows output and a timer when its collapsed row is opened in fullscreen.

  7. other

    Bash permission checks now ask first, or refuse where no one can answer, for some commands.

  8. performance

    On Windows, a session's first Bash command starts about a second faster.

  9. fix

    [VSCode] A running command's live output continues after one failed read.

Claude Code v2.1.325

  1. fix

    Fixed some deny and ask rules not applying to certain Bash commands.

  2. fix

    Fixed a gap where some compound Bash commands could run without asking; they now ask for permission.

  3. fix

    Fixed a case where a Bash allow rule could run a different program than the one it names.

Claude Code v2.1.323

  1. breaking Breaking

    Changed glab config set without --global or --host, and glab config edit --local, to fail read-only inside the Bash sandbox; run them outside it.

  2. fix

    Fixed Edit and Bash running out of memory on certain /proc files, and Edit hanging or running out of memory on devices and named pipes.

  3. fix

    Fixed ps processes piling up when the process listing Claude Code runs before stopping a command takes too long.

  4. fix

    Fixed Bash permission prompts offering don't ask again for commands writing to sensitive paths such as .git or .claude, where the saved rule did not stop the next prompt.

  5. fix

    Fixed some lsof commands running without a permission prompt.

+13 more
  1. fix

    Fixed Bash commands writing a file with cat > file <<EOF being displayed as Read 1 file.

  2. fix

    Fixed Bash permission checks judging an rm from the wrong folder, which could skip the dangerous-removal prompt under bypass permissions or a Bash allow rule.

  3. fix

    Fixed a case where Bash permission checks missed part of a command.

  4. fix

    Fixed Bash allow rules with an attached wildcard, such as Bash(ls*), skipping the permission prompt in some cases; rules naming a variable now prompt.

  5. fix

    Fixed Bash deny and ask rules missing some commands run through sudo, env, and similar wrappers.

  6. fix

    Fixed Bash allow rules written with combined sudo flags skipping the permission prompt in some cases.

  7. fix

    Fixed a Bash command running without a permission prompt for zsh users with certain non-default shell options set.

  8. fix

    Fixed some file-reading Bash commands running without a permission prompt when given a wildcard or list of files on Windows.

  9. fix

    Fixed Claude Code running a .cmd or .bat wrapper beside a program's .exe in the same PATH folder; it now runs the .exe, as cmd.exe would.

  10. fix

    Fixed shell commands failing with Working directory was deleted on Windows drives where a folder's real path cannot be resolved.

  11. performance

    Improved Bash permission checks so the same command more reliably gets the same answer on a slow or busy machine.

  12. other

    Improved Bash permission checks so some commands that could run differently from how they were checked now ask for permission.

  13. feature

    [VSCode] Added live output of a running Bash or PowerShell command to the chat, under the command's card.

Claude Code v2.1.321

  1. fix

    A read-only Bash command in one case ran outside the sandbox without a permission prompt; this is fixed.

  2. fix

    Bash permission checks in one case judged a file write from the wrong folder and did not prompt; this is fixed.

  3. fix

    Deny rules and protected-file prompts now apply to the file that a cp or mv into a directory writes.

  4. fix

    claude -p no longer sometimes tells Claude that background commands get 30 minutes when they are stopped after 10.

  5. fix

    pkill, pgrep and pidwait in cloud sessions no longer match the session's own parent processes.

+5 more
  1. fix

    Bash commands no longer sometimes run in the wrong folder when Claude sends several at once and an earlier one changes folders.

  2. fix

    Bash reads such as grep -r foo with a $PWD path no longer ask for permission when the same command with the typed-out path runs without asking.

  3. fix

    Bash commands no longer come back empty for zsh users whose .zshrc sets KSH_OPTION_PRINT.

  4. other

    cp and mv invoked by a path such as /bin/cp now get the same path checks as cp and mv.

  5. other

    Background command notifications and TaskStop results show Claude only the start and end of commands over 1,000 characters.

Claude Code v2.1.319

  1. breaking Breaking

    Changed a session's exact Bash or PowerShell ask rule to be refused, not asked about, when a broader deny rule covers the command.

  2. breaking Breaking

    Changed the Bash tool to ask for permission before running which with flags outside a lookup/display set.

  3. fix

    Fixed Bash deny and ask rules missing commands written with quoted words.

  4. fix

    Fixed background Bash commands that finish almost instantly losing their output while being reported as completed.

  5. fix

    Fixed the Bash tool's diff of changed files missing a file the command wrote just before it ended.

+3 more
  1. fix

    Fixed needless permission prompts for read-only commands wrapped in a plain timeout DURATION, such as timeout 30 rg foo.

  2. fix

    Fixed a sed command skipping the permission check in accept-edits and auto mode.

  3. fix

    Fixed a Bash permission bypass where a crafted environment prefix could hide part of a command from permission checks.

Claude Code v2.1.318

  1. fix

    Fixes macOS sessions with many running Bash commands stalling while memory grows.

  2. fix

    Fixes a shell command approved after a self-hosted runner or cloud session restart running in the session's start folder instead of the folder it was asked in; if that folder cannot be entered, the command is not run.

  3. fix

    Fixes variables a Setup hook writes to CLAUDE_ENV_FILE not reaching the Bash tool in some cloud sessions.

  4. fix

    Fixes the runtime in background shell details not updating while the dialog is open.

  5. fix

    Improves the reliability of git commits and pull request creation when the Bash tool runs macOS's built-in /bin/bash.

+1 more
  1. other

    Changes background subagents to move a shell command to the background after 3 minutes on all providers so the prompt cache does not expire while it runs.

Claude Code v2.1.316

  1. fix

    Fixed shell commands being left running on macOS and Linux when Claude Code exits by itself, such as when credentials are refused or a cloud session is archived.

  2. fix

    Fixed bash aliases with line breaks in their value (except in Git Bash) and functions whose names start with a dash being garbled or lost in the Bash tool's shell.

  3. fix

    Fixed bash scripts started from the Bash tool stopping after their first command when SHELLOPTS is exported.

  4. fix

    Fixed on Windows the Bash tool losing aliases and functions in Git Bash when the rc file sets errexit and pipefail and only winpty aliases, or none, are defined.

Claude Code v2.1.314

  1. other

    Changed the Bash tool shell to clear any inherited which alias or function and stop passing exported which or unsetenv functions to commands, so which is the system command or zsh builtin.

Claude Code v2.1.311

  1. fix

    Fixed the Bash tool description claiming the working directory always persists between calls.

  2. fix

    Fixed the environment block naming a shell that commands do not run in, such as fish when the Bash tool uses zsh.

  3. other

    Improved shell commands that reach their timeout: the result now shows output so far and says the command is still running in the background.

Claude Code v2.1.309

  1. breaking Breaking

    sed -i now runs with the standard Bash prompt as written instead of a simulated file-edit preview, and like other Bash edits it is no longer restored by /rewind.

  2. fix

    Sandboxed Bash commands on macOS and Linux no longer run the shell's startup files outside the sandbox before each command.

  3. fix

    The Bash permission check no longer trusts a variable set by a command whose redirect can fail to open.

  4. fix

    Bash permission checks now prompt for some compound commands that change directory before running git when the cd is wrapped or prefixed, as they do for a plain cd.

  5. fix

    An Edit(path) deny rule now blocks a Bash redirect to that path in some commands that also contain a subshell.

+1 more
  1. other

    A Bash command cut off by a full disk now says so and names the folder to free up, and starting on a full temp volume prints a clear message instead of a raw ENOSPC error.

Claude Code v2.1.305

  1. fix

    Fixed Bash commands on a full disk failing with a raw ENOSPC file path; the error now says the disk is full and that nothing ran.

Claude Code v2.1.304

  1. fix

    Fixed rm -r of a mounted drive or a top-level folder (/Volumes, /media, /mnt/c) not getting the safety prompt that rm -rf /Applications gets.

  2. fix

    Fixed unsandboxed Bash commands in Claude Desktop Code tab sessions on macOS and Linux not seeing environment variables exported in shell startup files such as ~/.zshrc.

  3. fix

    Fixed Bash and PowerShell deleting a large command's output file when it could not be copied to the session's tool-results folder, unless the disk is full.

Claude Code v2.1.299

  1. fix

    Fixed rm prompts on shell -c scripts that do not run rm; a runtime-built rm in an unreadable script no longer prompts unless CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT=1 is set.

  2. fix

    Fixed a custom slash command's embedded shell line running twice when a newer message interrupted the command during prompt checking.

  3. fix

    Windows: Fixed Bash commands failing with command not found for a whole session when Git Bash did not report its PATH at startup.

  4. fix

    Improved sandboxed Bash on Linux so Esc and Ctrl-C work while wildcard read rules are being expanded.

Claude Code v2.1.296

  1. fix

    Fixed Bash permission checks auto-approving some commands that assign the BASH_ARGV0 shell variable and then use it; these now prompt for approval.

  2. fix

    Windows: Fixed rm -rf /c/Users/<name> in Git Bash not asking in bypass permissions mode.

Claude Code v2.1.295

  1. fix

    Fixed Bash tool calls failing when the model passes command_description instead of description.

  2. fix

    Fixed Bash permission checks for for-loops over glob patterns, improving permission-check accuracy.

  3. fix

    Fixed a file being treated as already read after a Bash command such as cat ran without printing it.

  4. fix

    Fixed claude mcp serve background Bash results not naming the output file and a tool description promising a notification that never arrives.

  5. fix

    Fixed variables a SessionStart hook writes to CLAUDE_ENV_FILE not reaching the Bash tool after in-app /resume or /branch.

Claude Code v2.1.293

  1. fix

    Fixed path-scoped rules and nested CLAUDE.md files not loading when Claude views a file with cat, head, tail, sed -n, or grep in the Bash tool instead of the Read tool.

  2. other

    Improved the Bash edit diff note to say the listed files changed while the command ran, which can include writes by other processes.

Claude Code v2.1.290

  1. breaking Breaking

    The Bash tool now asks permission before running pyright, no longer treated as read-only.

  2. fix

    Fixed deny or ask rules missing commands or paths named via a prefix variable on declare, typeset, export or readonly.

  3. fix

    Fixed sandboxed commands piping a heredoc asking for approval on every run.

  4. fix

    Read-only commands like rg or git grep with shell-expanded wildcard arguments now prompt for approval.

  5. fix

    Commands whose variable names zsh reads differently from bash now prompt for approval.

+4 more
  1. fix

    Fixed the Bash tool sometimes losing aliases, functions and plugin PATH entries when the first command ran right after startup.

  2. fix

    Bash permission checks now apply Read deny rules and outside-directory blocks to wildcards in some option values.

  3. other

    The Bash changed-files view lists files without full diffs when a chain includes git merge, pull or checkout.

  4. other

    More forms of the ps command now ask for approval.

Claude Code v2.1.289

  1. fix

    Fixed deny or ask rules on a nested part of a compound shell command not overriding a user-installed mod's approval on managed machines.

  2. fix

    Fixed Bash deny and ask rules missing a command behind an environment variable prefix with an expanded value when the sandbox auto-allows commands.

  3. fix

    Fixed a Bash deny or ask rule being skipped under sandbox auto-allow when a bare variable assignment came before the command.

Claude Code v2.1.288

  1. fix

    Bash permission checks now prompt before a BASHPID assignment whose value the shell would evaluate as arithmetic instead of allowing it silently.

  2. fix

    Fixed a dangerous rm inside a bash -c or sh -c script running without a prompt in bypassPermissions mode or under a shell allow rule.

  3. other

    Bash permission prompts now give a shorter reason when part of a command can't be checked before it runs.

  4. other

    The background command time limit now applies only in unattended sessions; terminal, desktop app and VS Code sessions have no limit.

Claude Code v2.1.287

  1. breaking Breaking

    Whole-tool Bash allow rules and allowing hooks now prompt for, rather than run, shell writes to files the file tools refuse such as the Anthropic profile store and host credentials file.

  2. fix

    Fixed a dangerous rm losing its always-ask safeguard when the command also redirected output to a ~ or wildcard path.

  3. fix

    Fixed Bash permission prompts showing internal parser names instead of a plain explanation.

  4. fix

    Fixed sandboxed Bash commands on Linux inheriting an open handle on the Claude Code executable.

  5. performance

    Removed a subshell that ran before every Bash command on Windows.

+1 more
  1. other

    Shell writes through a repo-committed symlink onto a sensitive file or outside the working tree now name the target and wait for a person, including ~ targets.

Claude Code v2.1.285

  1. breaking Breaking

    Background Bash and PowerShell commands now stop after a time limit (their timeout with run_in_background, default 30 min, max 2 h), and Claude is notified when one is stopped.

  2. fix

    Fixed a cancelled shell command or hook still starting and running to completion when the cancel arrived during setup.

Claude Code v2.1.284

  1. fix

    Fixed the Bash tool failing on Windows with many plugins by not adding nonexistent plugin bin/ directories to PATH and not duplicating inherited entries.

  2. fix

    Fixed sandboxed Bash commands failing to start on Linux when the working directory is write-denied and contains a read-denied directory.

Claude Code v2.1.282

  1. fix

    Fixed Bash permission rules with a mid-pattern :* being skipped in settings files; they now work from every source with a startup warning on how they match.

  2. fix

    Fixed Bash and PowerShell hiding a full disk quota behind "Exit code 1" and leaving large output files in temp.