Claude Code v2.1.166 Release Notes
Claude Code v2.1.166 introduces fallback model configuration, enhanced security features, and numerous bug fixes for improved stability and user experience.
The latest Claude Code update brings significant improvements to model reliability, security hardening, and user interface fixes that power users have been requesting.
What’s New
Fallback Model Configuration
The standout feature in this release is the new fallbackModel setting, which allows you to configure up to three fallback models that will be tried in order when your primary model is overloaded or unavailable. This ensures uninterrupted workflows even during peak usage periods. The --fallback-model flag now also applies to interactive sessions, providing consistent behavior across all usage modes.
Enhanced Tool Management
Glob pattern support has been added to deny rule tool-name positions, with "*" now denying all tools for blanket restrictions. The system now warns about unknown tool names in deny rules at startup, helping you catch configuration issues early.
Security Improvements
Cross-session messaging has been significantly hardened. Messages relayed via SendMessage from other Claude sessions no longer carry user authority, with receivers now refusing relayed permission requests and auto mode blocking them entirely.
Thinking Control
You now have granular control over the thinking feature. Setting MAX_THINKING_TOKENS=0, using --thinking disabled, or toggling the per-model thinking setting will disable thinking on models that think by default via the Claude API.
Error Recovery
Claude Code now automatically retries a turn once on the fallback model when the API returns unexpected non-retryable errors, while still surfacing authentication, rate-limit, request-size, and transport errors immediately.
User Experience Improvements
claude updatenow announces the target version before downloading- In
claude agents, typing a URL filters to sessions containing that URL in their first prompt - Fixed recurring “image could not be processed” errors
- Resolved terminal flickering in JetBrains IDEs (IntelliJ, PyCharm, WebStorm) on 2026.1+
- Fixed Shift+non-ASCII character input issues in Kitty protocol terminals
- Resolved various PowerShell, macOS, and voice mode bugs
How to Update
Update to the latest version using:
claude update
The update process will now show you the target version before downloading begins.