← sources

Claude Code 2.1.305 to 2.1.309 (Oct 20 to 22): sed -i is now real Bash, rm auto-denied in bypass mode, ultrareview needs workspace trust, 62 bug fixes in .309

source: reddit (reddit:ClaudeCode)published 2026-10-23 02:29ingested 2026-10-24 02:40

retained text

Five versions landed between Monday and Wednesday. Most of it is permissions and sandbox hardening, so worth a read if you run Claude Code unattended or in scripts.

- `sed -i` now gets the standard Bash prompt and runs as written, not a simulated file-edit preview. Side effect: like other Bash edits, `/rewind` no longer restores it. (2.1.309)
- In bypass permissions mode in the desktop app and VS Code, dangerous `rm` and `rmdir` commands are now denied immediately with a rewrite hint instead of prompting, so unattended sessions keep going. (2.1.309)
- `claude ultrareview` now requires workspace trust. In a terminal it asks; in scripts you pass `--trust-workspace` or set `CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK=1`. (2.1.309)
- New `claude_code.safety_event` OpenTelemetry event for every tool call that a permission rule, auto mode, a safety check, a hook or the sandbox stopped, prompted or sent back. Useful if you track what Claude is being blocked from doing. (2.1.307)
- Sandbox fix: sandboxed Bash commands on macOS and Linux were running the shell's startup files outside the sandbox before each command. Fixed in 2.1.309.
- `allowedMcpServers` no longer filters `managed-mcp.json` stdio servers that use `${VAR}` only in `env`. A server your allowlist left out can now load on upgrade, use `deniedMcpServers` to keep it off. (2.1.305)
- New `/claude-api api-version` command to move your API code to API version `2026-10-21`. (2.1.307)
- 2.1.309 alone lists 8 improvements and 62 bug fixes, including repeated compaction after reading a very large nested CLAUDE.md, and fork subagents no longer starting each other's work.

Timing: 2.1.305 is dated Oct 20, 2.1.307 Oct 21, 2.1.308 and 2.1.309 Oct 22 on the changelog page.

The `sed -i` change is the one I'd check first if you have hooks or scripts that relied on the preview behaviour.

Did any of these changes break a script or hook for you, or is this all upside?

Source: https://code.claude.com/docs/en/changelog

document fetched 2026-10-24 00:41 · canonical https://reddit.com/r/ClaudeCode/comments/1xd1z6t/claude_code_21305_to_21309_oct_20_to_22_sed_i_is