Claude Code v2.1.166: Fallback Models, Glob Deny Rules, Cross-Session Hardening

Claude Code v2.1.166: Fallback Models, Glob Deny Rules, Cross-Session Hardening
Anthropic released Claude Code v2.1.166 with several notable improvements for reliability, security, and terminal compatibility. Here's what changed.
Key Features
- Fallback models: The new
fallbackModelsetting lets you configure up to three fallback models tried in order when the primary model is overloaded or unavailable. The--fallback-modelCLI flag now also applies to interactive sessions. Additionally, Claude Code retries a turn once on the fallback model when the API rejects an unexpected non-retryable error (auth, rate-limit, request-size, and transport errors still surface immediately). - Glob pattern support in deny rules: The tool-name position in deny rules now supports glob patterns — using
*denies all tools. Allow rules reject non-MCP globs, and unknown tool names in deny rules warn at startup. - Hardened cross-session messaging: Messages relayed via
SendMessagefrom other Claude sessions no longer carry user authority. Receivers refuse relayed permission requests, and auto mode blocks them entirely. - Thinking token control: Setting
MAX_THINKING_TOKENS=0, passing--thinking disabled, or toggling the per-model thinking toggle now disables thinking on models that think by default via the Claude API (third-party providers unchanged). - Update UX improvement:
claude updatenow announces the target version before downloading. - Agent list filtering: In
claude agents, typing a URL into the list filters to the session whose first prompt contained that URL.
Bug Fixes
- Fixed recurring "image could not be processed" error and extra token usage when an unprocessable image was sent.
- Fixed remote sessions permanently stuck after a brief backend disruption during worker registration at startup.
- Fixed flickering in JetBrains IDE terminals (IntelliJ, PyCharm, WebStorm etc.) on 2026.1+ by enabling synchronized output.
- Fixed Shift+non-ASCII characters (e.g. Shift+ä → Ä) being dropped in terminals using the Kitty keyboard protocol (WezTerm, Ghostty, kitty).
- Fixed PowerShell command validation occasionally hanging far past its time budget on Windows when a killed process's children held its output pipes.
- Fixed orphaned
claude --bg-pty-hostprocesses spinning at 100% CPU after the daemon dies while connected on macOS. - Fixed voice mode requiring
/loginto clear a stale auth check after toggling/voice. - Fixed managed settings with an invalid entry silently disabling enforcement of remaining valid policies.
- Fixed managed-settings
allowedMcpServers/deniedMcpServerspredicates not matching when they use${VAR}references. - Fixed background agent sessions that entered a git worktree crash-looping with "No conversation found" when reopened from
claude agents. - Fixed duplicated thinking text in the Ctrl+O transcript view while streaming.
- Fixed
/doctorshowing a contradictory failed "Not inside a remote session" check when run inside a remote session. - Fixed the cursor sticking at the end of the first line when typing a multiline prompt in the
claude agentsdispatch and reply inputs. - Fixed blank lines appearing between background agent rows in the task list on terminals without Unicode support.
Who It's For
Anyone using Claude Code for agentic coding, especially those relying on API reliability, custom deny rules, or multi-session orchestration.
📖 Read the full source: GitHub Claude-Code
👀 See Also

Banker Creates Credit Due Diligence Tool with 31 AI Prompts Using Only Claude
A banker with 17 years of MSME credit underwriting experience in India has open-sourced 31 AI prompts that transform a visiting card into a full credit due diligence report, compressing a 3-4 week process to 30 minutes. The tool was built entirely through conversation with Claude, without writing any code.

Lightpanda: Open-source headless browser for LLM agents with native MCP server and markdown output
Lightpanda is an open-source headless browser designed for LLM-powered agents that uses 16x less memory than Chrome (215MB vs 2GB) and completes web crawling benchmarks in 5 seconds instead of 47 seconds. It provides native markdown output, semantic tree with interactivity detection, and a built-in MCP server.

AbsolutelySkilled Registry Adds 156 Production-Ready Skills for Claude Code
A developer has created AbsolutelySkilled, a registry of 156 structured skill modules for Claude Code that persist across sessions. Each skill includes trigger conditions, reference files, test cases, and anti-patterns in SKILL.md files.

Argyph: A Single MCP Server for Claude Code with 19 Structured Code Understanding Tools
Argyph is a local MCP server that gives Claude Code 19 tools — go-to-definition, find-references, call graphs, semantic search, token-budgeted repo packing — replacing multiple separate MCP servers with one install. No API key required; all processing stays on your machine.