Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Claude Code v2.1.166 adds fallback model chains, glob-based tool deny rules, and hardened cross-session security.
$ git clone --branch v2.1.166 https://github.com/anthropics/claude-code.git # already have the repo? check out this version: $ git checkout v2.1.166
$ MAX_THINKING_TOKENS=0 claude -p "Analyze this code for vulnerabilities" < main.go
- ›Adds
fallbackModelsetting to configure up to three fallback models tried in order when the primary model is overloaded or unavailable;--fallback-modelnow also applies to interactive sessions. - ›Adds glob pattern support in deny rule tool-name position (
"*"denies all tools); allow rules reject non-MCP globs, and unknown tool names in deny rules warn at startup. - ›Hardens 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. - ›Enables disabling thinking on models that think by default via the Claude API using
MAX_THINKING_TOKENS=0,--thinking disabled, or the per-model thinking toggle (3P providers unchanged). - ›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.
+2 moreshow less
- ›
claude updatenow announces the target version before downloading. - ›In
claude agents, typing a URL into the session list now filters to the session whose first prompt contained it.