Change8

v2.1.166

Claude Code
5 features13 fixes3 improvementsclijetbrainsmcpsdkvscode

Summary

This release introduces robust fallback model support, allowing sessions to automatically retry on secondary models when the primary API endpoint is overloaded. Security has been enhanced through hardened cross-session messaging, and several critical bugs affecting terminal input, remote sessions, and managed settings have been resolved. Additionally, glob pattern support has been added to tool deny rules for more flexible configuration.

New Features

  • Added support for configuring up to three fallback models to be tried sequentially when the primary model is unavailable via the new `fallbackModel` setting, which also applies to interactive sessions via the `--fallback-model` flag.
  • Enabled glob pattern support in the deny rule tool-name position, allowing for broader denial rules (e.g., "*" denies all tools).
  • Introduced hardened cross-session messaging where messages relayed from other Claude sessions no longer carry user authority, causing receivers to refuse relayed permission requests and auto mode to block them.
  • Enabled disabling thinking on models that think by default via the Claude API by setting `MAX_THINKING_TOKENS=0`, using `--thinking disabled`, or toggling the per-model thinking setting.
  • Enabled Claude Code to automatically retry a turn once on the fallback model when the API returns an unexpected non-retryable error.

Bug Fixes

  • Fixed a recurring "image could not be processed" error and associated extra token usage when an unprocessable image was sent in a session.
  • Fixed remote sessions becoming permanently stuck during startup if a brief backend disruption occurred while the worker was registering.
  • Fixed Shift+non-ASCII characters (e.g., Shift+ä → Ä) being dropped when typing in terminals using the Kitty keyboard protocol (like WezTerm or Ghostty).
  • Fixed PowerShell command validation occasionally hanging excessively on Windows when a killed process's children held its output pipes.
  • Fixed orphaned `claude --bg-pty-host` processes consuming 100% CPU after the daemon died while a connection was active on macOS.
  • Fixed voice mode incorrectly requiring `/login` to clear a stale authentication check after toggling `/voice".
  • Fixed managed settings with one invalid entry silently disabling enforcement of their remaining valid policies.
  • Fixed managed-settings predicates `allowedMcpServers`/`deniedMcpServers` failing to match when they utilized ${VAR} references.
  • Fixed background agent sessions that entered a git worktree crash-looping with "No conversation found" upon reopening from the `claude agents` list.
  • Fixed duplicated thinking text appearing in the Ctrl+O transcript view during streaming.
  • Fixed `/doctor` incorrectly reporting a failed "Not inside a remote session" check when executed inside an active remote session.
  • Fixed the cursor sticking at the end of the first line when typing a multiline prompt within the `claude agents` dispatch and reply inputs.
  • Fixed blank lines appearing between background agent rows in the task list on terminals lacking Unicode support.

Improvements

  • The `claude update` command now announces the target version before starting the download, improving user feedback during updates.
  • Typing a URL into the agent list now correctly filters to the session whose first prompt contained that URL.
  • Fixed flickering issues observed in JetBrains IDE terminals (IntelliJ, PyCharm, WebStorm, etc.) on version 2026.1+ by enabling synchronized output.

Claude Code Documentation

Claude Code v2.1.166 - What's New - Change8