bash
The tracked changes tagged bash, newest release first. Every sentence is an item's summary.
Goes with
Changes
Claude Code v2.1.332
-
On Linux, the Bash edit diff no longer shows an unchanged symlink as edited after Claude read the file through it.
-
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
-
Fixed sandboxed Bash commands sometimes failing to start on a full temp disk when sandbox file rules keep commands out of the temp directory.
-
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
-
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.
-
Linux: fixed Bash commands waiting seconds and showing no file diff for the rest of a session in slow repositories with large ignored folders.
-
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.
-
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.
-
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
-
Changed permissions.blockReadsOutsideWorkingDirectories to ask about more Bash commands in bypass and auto modes, and to deny some in auto mode.
-
Changed permissions.blockReadsOutsideWorkingDirectories to refuse more Bash commands that name a path under a Read or Edit deny rule, where it previously asked.
-
Fixed the Bash tool's diff not naming changed files that are binary, too large or too many to show.
-
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.
-
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
-
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
-
Claude Code no longer keeps some sandbox state, and Bash may ask first until /sandbox or /cd is run.
-
Bash commands on macOS that ran before now ask or are refused.
-
Auto mode stops some shell commands that ran before.
-
Some cp and mv commands now ask first.
-
Bash commands with very long values that cannot be fully checked now ask, or are refused where a deny rule may apply.
-
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
-
cp of a file is no longer refused when only its source is covered by an Edit deny rule.
-
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.
-
A misleading Dangerous rm operation warning no longer appears in the Bash permission prompt for some commands with no rm.
-
grep in the Bash tool no longer silently skips some text files.
-
Very long Bash or PowerShell commands and long new files in permission prompts no longer freeze the session for seconds.
-
A running command shows output and a timer when its collapsed row is opened in fullscreen.
-
Bash permission checks now ask first, or refuse where no one can answer, for some commands.
-
On Windows, a session's first Bash command starts about a second faster.
-
[VSCode] A running command's live output continues after one failed read.
Claude Code v2.1.325
-
Fixed some deny and ask rules not applying to certain Bash commands.
-
Fixed a gap where some compound Bash commands could run without asking; they now ask for permission.
-
Fixed a case where a Bash allow rule could run a different program than the one it names.
Claude Code v2.1.323
-
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.
-
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.
-
Fixed ps processes piling up when the process listing Claude Code runs before stopping a command takes too long.
-
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.
-
Fixed some lsof commands running without a permission prompt.
+13 more
-
Fixed Bash commands writing a file with cat > file <<EOF being displayed as Read 1 file.
-
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.
-
Fixed a case where Bash permission checks missed part of a command.
-
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.
-
Fixed Bash deny and ask rules missing some commands run through sudo, env, and similar wrappers.
-
Fixed Bash allow rules written with combined sudo flags skipping the permission prompt in some cases.
-
Fixed a Bash command running without a permission prompt for zsh users with certain non-default shell options set.
-
Fixed some file-reading Bash commands running without a permission prompt when given a wildcard or list of files on Windows.
-
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.
-
Fixed shell commands failing with Working directory was deleted on Windows drives where a folder's real path cannot be resolved.
-
Improved Bash permission checks so the same command more reliably gets the same answer on a slow or busy machine.
-
Improved Bash permission checks so some commands that could run differently from how they were checked now ask for permission.
-
[VSCode] Added live output of a running Bash or PowerShell command to the chat, under the command's card.
Claude Code v2.1.321
-
A read-only Bash command in one case ran outside the sandbox without a permission prompt; this is fixed.
-
Bash permission checks in one case judged a file write from the wrong folder and did not prompt; this is fixed.
-
Deny rules and protected-file prompts now apply to the file that a cp or mv into a directory writes.
-
claude -p no longer sometimes tells Claude that background commands get 30 minutes when they are stopped after 10.
-
pkill, pgrep and pidwait in cloud sessions no longer match the session's own parent processes.
+5 more
-
Bash commands no longer sometimes run in the wrong folder when Claude sends several at once and an earlier one changes folders.
-
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.
-
Bash commands no longer come back empty for zsh users whose .zshrc sets KSH_OPTION_PRINT.
-
cp and mv invoked by a path such as /bin/cp now get the same path checks as cp and mv.
-
Background command notifications and TaskStop results show Claude only the start and end of commands over 1,000 characters.
Claude Code v2.1.319
-
Changed a session's exact Bash or PowerShell ask rule to be refused, not asked about, when a broader deny rule covers the command.
-
Changed the Bash tool to ask for permission before running which with flags outside a lookup/display set.
-
Fixed Bash deny and ask rules missing commands written with quoted words.
-
Fixed background Bash commands that finish almost instantly losing their output while being reported as completed.
-
Fixed the Bash tool's diff of changed files missing a file the command wrote just before it ended.
+3 more
-
Fixed needless permission prompts for read-only commands wrapped in a plain timeout DURATION, such as timeout 30 rg foo.
-
Fixed a sed command skipping the permission check in accept-edits and auto mode.
-
Fixed a Bash permission bypass where a crafted environment prefix could hide part of a command from permission checks.
Claude Code v2.1.318
-
Fixes macOS sessions with many running Bash commands stalling while memory grows.
-
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.
-
Fixes variables a Setup hook writes to CLAUDE_ENV_FILE not reaching the Bash tool in some cloud sessions.
-
Fixes the runtime in background shell details not updating while the dialog is open.
-
Improves the reliability of git commits and pull request creation when the Bash tool runs macOS's built-in /bin/bash.
Claude Code v2.1.316
-
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.
-
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.
-
Fixed bash scripts started from the Bash tool stopping after their first command when SHELLOPTS is exported.
-
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
-
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
-
Fixed the Bash tool description claiming the working directory always persists between calls.
-
Fixed the environment block naming a shell that commands do not run in, such as fish when the Bash tool uses zsh.
-
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
-
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.
-
Sandboxed Bash commands on macOS and Linux no longer run the shell's startup files outside the sandbox before each command.
-
The Bash permission check no longer trusts a variable set by a command whose redirect can fail to open.
-
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.
-
An Edit(path) deny rule now blocks a Bash redirect to that path in some commands that also contain a subshell.
Claude Code v2.1.305
-
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
-
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.
-
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.
-
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
-
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.
-
Fixed a custom slash command's embedded shell line running twice when a newer message interrupted the command during prompt checking.
-
Windows: Fixed Bash commands failing with command not found for a whole session when Git Bash did not report its PATH at startup.
-
Improved sandboxed Bash on Linux so Esc and Ctrl-C work while wildcard read rules are being expanded.
Claude Code v2.1.296
-
Fixed Bash permission checks auto-approving some commands that assign the BASH_ARGV0 shell variable and then use it; these now prompt for approval.
-
Windows: Fixed rm -rf /c/Users/<name> in Git Bash not asking in bypass permissions mode.
Claude Code v2.1.295
-
Fixed Bash tool calls failing when the model passes command_description instead of description.
-
Fixed Bash permission checks for for-loops over glob patterns, improving permission-check accuracy.
-
Fixed a file being treated as already read after a Bash command such as cat ran without printing it.
-
Fixed claude mcp serve background Bash results not naming the output file and a tool description promising a notification that never arrives.
-
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
-
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.
-
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
-
The Bash tool now asks permission before running pyright, no longer treated as read-only.
-
Fixed deny or ask rules missing commands or paths named via a prefix variable on declare, typeset, export or readonly.
-
Fixed sandboxed commands piping a heredoc asking for approval on every run.
-
Read-only commands like rg or git grep with shell-expanded wildcard arguments now prompt for approval.
-
Commands whose variable names zsh reads differently from bash now prompt for approval.
+4 more
-
Fixed the Bash tool sometimes losing aliases, functions and plugin PATH entries when the first command ran right after startup.
-
Bash permission checks now apply Read deny rules and outside-directory blocks to wildcards in some option values.
-
The Bash changed-files view lists files without full diffs when a chain includes git merge, pull or checkout.
-
More forms of the ps command now ask for approval.
Claude Code v2.1.289
-
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.
-
Fixed Bash deny and ask rules missing a command behind an environment variable prefix with an expanded value when the sandbox auto-allows commands.
-
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
-
Bash permission checks now prompt before a BASHPID assignment whose value the shell would evaluate as arithmetic instead of allowing it silently.
-
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.
-
Bash permission prompts now give a shorter reason when part of a command can't be checked before it runs.
-
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
-
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.
-
Fixed a dangerous rm losing its always-ask safeguard when the command also redirected output to a ~ or wildcard path.
-
Fixed Bash permission prompts showing internal parser names instead of a plain explanation.
-
Fixed sandboxed Bash commands on Linux inheriting an open handle on the Claude Code executable.
-
Removed a subshell that ran before every Bash command on Windows.
+1 more
-
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
-
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.
-
Fixed a cancelled shell command or hook still starting and running to completion when the cancel arrived during setup.
Claude Code v2.1.284
-
Fixed the Bash tool failing on Windows with many plugins by not adding nonexistent plugin bin/ directories to PATH and not duplicating inherited entries.
-
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
-
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.
-
Fixed Bash and PowerShell hiding a full disk quota behind "Exit code 1" and leaving large output files in temp.