Claude Code's sandbox stops running your shell startup files outside it

43 minutes ago

Claude Code v2.1.308 to v2.1.309: sandboxed Bash commands stop running your shell's startup files outside the sandbox. Also: three commands that skipped a permission check now ask, sed -i runs as written (and /rewind no longer restores it), dangerous rm is denied with a hint in bypass mode, claude ultrareview requires workspace trust, and faster Edit and Write in VS Code. https://github.com/anthropics/claude-code/releases/tag/v2.1.308 https://github.com/anthropics/claude-code/releases/tag/v2.1.309 https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Sandbox startup files
  2. 0:15Commands that now ask
  3. 0:29sed -i
  4. 0:42rm in bypass mode
  5. 0:55claude ultrareview trust
  6. 1:08Fixes you may have hit
  7. 1:23Faster edits in VS Code
  8. 1:35The full changelog
Show transcript

Sandbox startup files

Claude Code

Claude Code's sandbox stops running your shell startup files outside it

Startup files
no longer run outside the sandbox before each Bash command
Symlinks
macOS denyWrite globs apply at the folder's real location
--mcp-config
sandboxed commands and auto-accepted edits can't modify it
Linux
write denies hold when a background command outlives the session
Release v2.1.309 · anthropics/claude-code

Claude Code's sandboxed Bash commands stop running your shell's startup files outside the sandbox first. Write denies now hold through symlinks and after a session ends, and your MCP config file is off limits.

Commands that now ask

Claude Code

>Three commands that skipped a permission check now ask first

cd, then git
a wrapped or prefixed cd prompts like a plain cd
Edit(path) deny
also blocks a Bash redirect to that path from a subshell
Windows
Set-Location or cd to the current folder with extra arguments prompts
Release v2.1.309 · anthropics/claude-code

Three commands that slipped past a permission check now ask. A wrapped CD before git, a Bash redirect from a subshell to a path an Edit rule denies, and on Windows, a CD carrying extra arguments.

sed -i

Claude Code

>sed -i now runs as written, and /rewind no longer restores it

Before
a simulated file-edit preview
Now
the standard Bash prompt, then the command as written
/rewind
does not restore it, like other Bash edits
Release v2.1.309 · anthropics/claude-code

Running sed in place now gets the normal Bash prompt and runs as written, not a simulated edit preview. The catch: like other Bash edits, /rewind no longer restores it.

rm in bypass mode

Claude Code

>In bypass permissions mode, a dangerous rm is denied with a hint

Where
the Desktop app and VS Code
Commands
dangerous rm and rmdir
Now
denied at once with a rewrite hint, so unattended sessions keep going
Release v2.1.309 · anthropics/claude-code

In bypass permissions mode in the desktop app and VS Code, a dangerous remove command no longer stops on a prompt. It is denied at once with a hint to rewrite it, so unattended sessions keep going.

claude ultrareview trust

Claude Code

>claude ultrareview now requires workspace trust

On a terminal
it asks first
Without one
it refuses
Scripts
opt in with a flag or an environment variable
Release v2.1.309 · anthropics/claude-code

claude ultrareview now needs workspace trust. On a terminal it asks first. Without one it refuses, so a script that runs it has to opt in.

Fixes you may have hit

Claude Code

>Fixed: repeated compaction, send now, and the Xcode tools dialog

Large nested CLAUDE.md
no repeated compaction; an oversized one loads only its start
ctrl+enter
sends at once, even before the response starts
Mac without Xcode
no Command Line Tools dialog each time Claude Code starts
Release v2.1.309 · anthropics/claude-code

Sessions stop compacting over and over after a huge nested Claude MD file. Control enter sends right away, even before the response starts. And Macs without Xcode stop showing the developer tools dialog at every start.

Faster edits in VS Code

Claude Code

>VS Code: Edit and Write finish sooner in the chat panel

Wait for new problems
0.75 seconds in most cases
Before
1 to 1.5 seconds after each edit
Release v2.1.309 · anthropics/claude-code

In VS Code, edits finish sooner. After each Edit or Write, the chat panel waits about three quarters of a second for new problems, down from as much as one and a half.

The full changelog

Claude Code

Every change is in the Claude Code changelog

https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

CHANGELOG.md in anthropics/claude-code

Do you run Claude Code with the sandbox turned on?

Releases v2.1.308 and v2.1.309 · anthropics/claude-code

The Claude Code changelog has the rest, including Slack, cloud session and Code Review fixes. So, do you run Claude Code with the sandbox turned on?

Up next

1:39

Claude Code's /claude-api now moves your code to the new Claude API version

@claude-code · 1 day ago

1:30

Claude Code v2.1.305 works again on Vertex and Bedrock, and its Linux sandbox can run Chromium

@claude-code · 2 days ago

1:35

Claude Code’s /auto-mode-setup teaches auto mode your project, and resume warns before it eats your 5-hour limit

@claude-code · 3 days ago

1:54

Claude Code v2.1.302 turns fork subagents on in the Agent SDK and VS Code, and standalone Claude Design closes December 14

@claude-code · 6 days ago

1:36

Claude Code v2.1.301: switching to a smaller model now summarizes your long conversation first

@claude-code · 1 week ago

2:06

Claude Code v2.1.300: one rejected MCP tool no longer fails every turn of your conversation

@claude-code · 1 week ago

1:53

Claude Code v2.1.299: come back from a break without reprocessing your whole session

@claude-code · 1 week ago

1:46

Claude Code v2.1.296: Claude can read a large file in one call

@claude-code · 1 week ago

1:36

Claude Code: hooks can now block an action when they fail

@claude-code · 2 weeks ago

1:39

Claude Code v2.1.293: Claude Haiku 5.5 becomes the default Haiku model, and finished work stays finished after a compaction

@claude-code · 2 weeks ago

1:32

Claude Code: subagents run at the effort you ask for, plugins install from a marketplace in one command, and network-path reads ask first

@claude-code · 2 weeks ago

1:23

Claude Code v2.1.290: WebSearch refills by the hour, WebFetch says what it left unread, and scheduled tasks stop going missing

@claude-code · 2 weeks ago