What changed
Claude Code 2.1.160 shipped on June 2, 2026. The release has two main threads. First, it tightens the write paths that can lead to unintended command execution — confirmation prompts now appear before writes to shell startup files and to build-tool config files that grant code execution. Second, the dynamic-workflow trigger keyword is renamed from workflow to ultracode. Beyond that, single-file grep now satisfies the read-before-edit check, and the release lands a broad sweep of claude agents, background-session, Windows/WSL clipboard, voice-mode, and auto-mode classifier fixes.
The two preceding releases are not covered separately: 2.1.158 was a single-line change extending Auto mode availability on Bedrock, Vertex, and Foundry for Opus 4.7 and 4.8 (opt in with CLAUDE_CODE_ENABLE_AUTO_MODE=1), and 2.1.159 was internal infrastructure with no user-facing changes. The Auto-mode opt-in is noted below.
Key improvements
-
Shell startup file write protection
Writes to shell startup files (
.zshenv,.zlogin,.bash_login) and~/.config/git/could happen without confirmation, leaving room for unintended commands to run in the next shell session. A prompt now appears before writing to these paths. -
acceptEditsprompts before build-tool config writesIn
acceptEditsmode every edit was auto-approved, including writes to build-tool configs that grant code execution (.npmrc,.yarnrc*,bunfig.toml,.bazelrc,.pre-commit-config.yaml,.devcontainer/, etc.). These files now prompt for confirmation inacceptEditsmode. -
Single-file
grepsatisfies the Edit read-before-edit checkAfter viewing a file with
grep/egrep/fgrep, editing it required a separate Read first. Single-file grep commands now satisfy the read-before-edit check directly. -
Dynamic-workflow trigger renamed from
workflowtoultracodeThe word
workflowin a prompt could trigger a dynamic workflow unintentionally (2.1.157 added a/configtoggle for it). The trigger keyword itself is nowultracode. Asking in your own words (“create a workflow”, and so on) still works. The trigger keyword is highlighted in violet in the prompt input. -
Auto mode classifier latency reduced
Auto mode’s safety classifier was running heavy reasoning even on routine actions, causing slow responses and occasional “could not evaluate this action” blocks. Reasoning on routine actions is reduced, lowering both latency and the chance of those blocks.
-
Graceful background-session teardown (SIGTERM before SIGKILL)
claude rm,stop, and the idle reap sent SIGKILL to running shell subprocesses outright, skipping cleanup handlers. Teardown now sends SIGTERM first so cleanup handlers run, then SIGKILL. -
Faster reopen of recently-inactive background agent sessions
Reopening a recently-inactive background agent session in
claude agentscould feel sluggish. Performance is improved.
Bug fixes
claude agents & background sessions
- Restoring a completed session from
claude agentsdropping chat history and re-running the original prompt — fixed. - Background sessions re-attached after overnight retire losing their conversation and re-running the original prompt — fixed.
claude --bgoccasionally failing with “socket missing” when the background daemon was cold-starting on a loaded machine — fixed.- Background agents that resumed work being shown under Completed in the agents list — fixed.
claude agentsfreezing for several seconds when returning to the session list due to the auto-updater re-checking on every exit — fixed.- CJK IME composition appearing at the bottom-left of the screen instead of at the input caret in the
claude agentsview — fixed. - Mouse wheel scrolling prompt history instead of the transcript right after opening a session from the agents list — fixed.
- Background agents emitting terminal sync-output markers to terminals that don’t support them (Apple Terminal, tmux), causing render artifacts when entering a running agent — fixed.
Windows & WSL
- Copy-on-select not writing to the Windows clipboard on WSL — now uses PowerShell interop instead of OSC 52, which terminals like MobaXterm don’t support.
- Esc, arrow keys, and typing becoming unresponsive on Windows when attached to a background session or in the agent view while the host is under heavy CPU load — fixed.
- The directory a background session was started in could not be deleted after
claude rmuntil the background daemon exited (Windows) — fixed. - Valid
file:///C:/...links being rewritten to a broken path on Windows terminals with hyperlink support — fixed.
Modes, models, and input
- Voice mode failing to connect when the project directory or branch name contains non-ASCII or special characters — fixed.
/effort ultracodeincorrectly blaming the dynamic workflows setting when the model cannot run xhigh — fixed.ultracodeis no longer offered on models that do not support it.- Model-not-found errors suggesting
--modelwhen running via the SDK or other hosts where the CLI flag doesn’t apply — fixed. - Vim mode
ppasting on the line below instead of at the cursor when the register was yanked withv$— fixed. - Claude’s past replies disappearing from scrollback when resuming a brief-mode session with brief mode turned off — fixed.
- The auto mode unavailability message on third-party providers (Bedrock/Vertex/Foundry) now points to the
CLAUDE_CODE_ENABLE_AUTO_MODEopt-in instead of incorrectly blaming the model.
Removals
CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDEis now a no-op — removed as previewed in 2.1.154 on 06/01. For Fast mode on Opus 4.6, switch with/model claude-opus-4-6[1m]and then/fast on.- The JetBrains plugin install suggestion at startup has been removed.
Notes
- Skipped versions — 2.1.158 was a single-line change adding Auto mode on Bedrock, Vertex, and Foundry for Opus 4.7 and 4.8 (opt in with
CLAUDE_CODE_ENABLE_AUTO_MODE=1), and 2.1.159 was an internal infrastructure release with no user-facing changes. Neither is covered separately. - Auto mode on third-party providers — to enable Auto mode for Opus 4.7 or 4.8 on Bedrock, Vertex, or Foundry, set
CLAUDE_CODE_ENABLE_AUTO_MODE=1(introduced in 2.1.158). 2.1.160 makes the opt-in show up correctly in the unavailability message. - Workflow trigger keyword change — to trigger a dynamic workflow by keyword, use
ultracodeinstead ofworkflow. Asking in your own words (“create a workflow”, and so on) still works. - Extra confirmations in
acceptEdits— build-tool config files (.npmrc,bunfig.toml, and the like) that can grant code execution now prompt for confirmation even underacceptEdits. If an automated flow stalls in this mode, the new prompt is likely the cause.