Claude Code 2.1.160: Security Prompts, Background Session Fixes

Claude Code 2.1.160 adds security prompts for shell startup files, fixes background session chat history loss, improves Windows/WSL clipboard and voice mode, and renames the dynamic workflow trigger to "ultracode".

Claude Code 2.1.160: Security Prompts, Background Session Fixes

TL;DR

  • New security prompts before writing to shell startup files and git config to prevent unintended command execution
  • Background session fixes: restored chat history, fixed freezing, improved performance
  • Windows/WSL improvements: clipboard copy-on-select, hyperlink paths, voice mode with special characters
  • Renamed dynamic workflow trigger from "workflow" to "ultracode"

New

  • Security prompts for shell startup files — Claude Code now prompts before writing to `.zshenv`, `.zlogin`, `.bash_login`, and `~/.config/git/` to prevent accidental command execution
  • acceptEdits mode config file protection — Prompts before modifying build-tool configs (`.npmrc`, `.yarnrc*`, `bunfig.toml`, `.bazelrc`, `.pre-commit-config.yaml`, `.devcontainer/`) that grant code execution
  • Ultracode trigger keyword — Dynamic workflows now triggered by "ultracode" instead of "workflow"; the old keyword no longer activates runs
  • Improved grep read-before-edit — Single-file `grep`/`egrep`/`fgrep` commands now satisfy the read check without requiring a separate Read action

Fixed

  • Windows clipboard copy-on-select now works on WSL using PowerShell interop instead of OSC 52, fixing MobaXterm compatibility
  • Background sessions restored from `claude agents` no longer drop chat history or re-run the original prompt
  • Overnight-retired background sessions losing conversation and re-running prompts
  • `claude --bg` "socket missing" failures on cold-start with high machine load
  • Windows directory deletion blocked after `claude rm` until background daemon exited
  • Completed background agents incorrectly shown under Completed in agents list
  • `claude agents` freezing for seconds on session list return due to auto-updater re-checking
  • Unresponsive Esc, arrow keys, and typing on Windows under heavy CPU load when attached to background sessions
  • Background agents emitting unsupported terminal sync markers (Apple Terminal, tmux) causing render artifacts
  • Mouse wheel scrolling prompt history instead of transcript after opening session from agents list
  • CJK IME composition appearing at bottom-left instead of input caret in agents view
  • Broken `file:///C:/...` hyperlinks on Windows terminals with hyperlink support
  • Voice mode connection failures with non-ASCII or special characters in project directory or branch name
  • Auto mode unavailability message on third-party providers (Bedrock/Vertex/Foundry) now correctly points to `CLAUDE_CODE_ENABLE_AUTO_MODE` opt-in
  • `/effort ultracode` incorrectly blaming dynamic workflows setting; ultracode no longer offered on unsupported models
  • Model-not-found errors suggesting `--model` when running via SDK or other hosts
  • Claude's past replies disappearing from scrollback when resuming brief mode session with brief mode off
  • Vim mode `p` pasting on line below instead of at cursor when register yanked with `v$`

Improved

  • Background agent session performance — Opening recently-inactive sessions in `claude agents` is now faster
  • Auto mode classifier latency — Reduced reasoning on routine actions, lowering "could not evaluate this action" blocks
  • Background session cleanup — Now sends SIGTERM to running shell subprocesses before SIGKILL, allowing cleanup handlers to run

Removed

  • `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE` environment variable is now a no-op
  • JetBrains plugin install suggestion from startup

Update Claude Code: npm install -g @anthropic-ai/claude-code or visit code.claude.com

Source: Claude Code