Claude Code · v2.1.168
What's changed
- Bug fixes and reliability improvements
fallbackModel setting to configure up to three fallback models tried in order when the primary model is overloaded or unavailable; --fallback-model now also applies to interactive sessions"*" denies all tools); allow rules reject non-MCP globs, and unknown tool names in deny rules warn at startupSendMessage from other Claude sessions no longer carry user authority — receivers refuse relayed permission requests, and auto mode blocks themMAX_THINKING_TOKENS=0, --thinking disabled, and the per-model thinking toggle now disable thinking on models that think by default via the Claude API (3P providers unchanged)claude update now announces the target version before downloading instead of going silentclaude agents: typing a URL into the list now filters to the session whose first prompt contained itclaude --bg-pty-host processes spinning at 100% CPU after the daemon dies while connected on macOS/login to clear a stale auth check after toggling /voiceallowedMcpServers/deniedMcpServers predicates not matching when they use ${VAR} referencesclaude agents/doctor showing a contradictory failed "Not inside a remote session" check when run inside a remote sessionclaude agents dispatch and reply inputsClaude Opus 4.1 model (claude-opus-4-1-20250805) is being deprecated with retirement scheduled for August 5, 2026. Users are recommended to migrate to Claude Opus 4.8.
requiredMinimumVersion and requiredMaximumVersion managed settings — Claude Code refuses to start if its version is outside the allowed range and directs the user to an approved version/plugin list command to list installed plugins, with --enabled/--disabled filters/btw that copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewherehookSpecificOutput.additionalContext to give Claude feedback and keep the turn going without being labeled a hook error\$ escape syntax to include a literal $ before a digit in command bodiesCLAUDE_CODE_SESSION_ID as hooks/Bash on --resumeclaude -p hanging forever after its final result when a backgrounded command never exits — background shells are now stopped ~5s after the result once stdin closesclaude -p failing with "ANTHROPIC_API_KEY required" on Bedrock/Vertex/Foundry when CI=true and no Anthropic API key is set$TMPDIR was overridden to /tmp/claude-{uid} for all commands instead of only sandboxed ones (regression in 2.1.154)claude agents losing their running background tasks when reattached after a Claude Code updateif: "Bash(...)" conditions firing on every Bash command containing $() or $VAR; the pattern now matches against commands inside subshells and backticks tooRead(~/Desktop/**)) not blocking Bash commands that reference the path via $HOMEclaude agents dispatching from the state-grouped view now starts the session in the directory the agent view was opened fromclaude agents --json now includes waitingFor showing what a waiting session is blocked on (e.g. permission prompt)--tools: explicitly listing Grep/Glob now provides the dedicated search tools on native builds with embedded search (previously these names were silently ignored)/effort now confirms when your chosen level will persist as the default for new sessions/ide menu, /terminal-setup, and /scroll-speed, following the editor's rebrandWebFetch(domain:...) deny/ask/allow rules now take precedence over the preapproved-host auto-allow~\, \\server\share) or case-variant paths, and Read deny rules not hiding files from Glob/Grep resultsno low surrogate in string errors for classifier side-queries and MCP server descriptions containing emoji near a truncation boundarytimeout config values below 1000 ms being floored to a 1-second watchdog that aborted every tool call; sub-1000 ms values are now ignored (falling back to MCP_TOOL_TIMEOUT or default), and claude mcp get annotates them accordinglyworkspaceSymbol operation returning no results; it now accepts a query parameter and passes it to the language serverclaude agents cutting live status text (tool args, replies, prompts, exec output) at 60–120 columns on wide terminals; the status detail now uses the full terminal widthclaude agents truncating long session names at 40 columns; the name column now grows with terminal widthclaude agents attach occasionally bouncing straight back to the session list on the first try after a background-service restartclaude agents Ctrl+V image paste doing nothing in the dispatch input and the session reply box; pasting with no image now shows a hintSendMessage) silently breaking when CLAUDE_CODE_TMPDIR or $TMPDIR points at a deep directoryclaude agents stalling for 5 seconds before attachingclaude update verification to wait out endpoint-security scanning of new binaries instead of failing after 5 secondsOTEL_RESOURCE_ATTRIBUTES values are now included as labels on metric datapoints, so you can slice usage metrics by custom dimensions like team or repoclaude agents rows now show done/total before the detail when work is fanned out; peek shows the longest-running item/mcp now collapses claude.ai connectors you've never signed in to behind a "Show unused connectors" rowwl-copy/xclip/xsel on Linux when available, copies to both the clipboard and PRIMARY selection for middle-click paste, and the "hold {key} for native selection" hint now shows the correct key per terminal/effort dialog, workflow animations, and prompt keyword shimmer not honoring the "Reduce motion" settingforceLoginOrgUUID/forceLoginMethod managed-settings policies blocking third-party provider sessions (Bedrock, Vertex, Foundry, Mantle) alongside the org pin (regression in 2.1.146)claude -p stdout when using --output-format text or json/usage-credits starting a re-login for Team and Enterprise admins instead of pointing to the organization's usage settings page/autofix-pr reporting "cannot run on the default branch" when the session is inside a git worktree or another repository--resume picker not showing sessions from the current directory when it isn't a git worktree (e.g., jj workspaces)/usr/bin/bash script.sh) failing with "command not found" or "cannot execute binary file"user_prompt, api_request, tool_result, tool_decision) being silently dropped when emitted before telemetry initialization completedclaude mcp list/get/add printing secrets to the terminal: ${VAR} references are no longer expanded, and credential headers and URL secrets are redactedisolation: "worktree" in background sessions being blocked from editing files inside their own worktreeclaude agents booting on a stale model from the daemon's environment instead of the model in settings.jsonEADDRINUSE errors from tools that bind Unix sockets under $TMPDIR when CLAUDE_CODE_TMPDIR is set to a deep path/terminal-setup) to fix garbled glyphs.zshenv, .zlogin, .bash_login) and ~/.config/git/, which could otherwise lead to unintended command executionacceptEdits mode now prompts before writing build-tool config files that grant code execution (.npmrc, .yarnrc*, bunfig.toml, .bazelrc, .pre-commit-config.yaml, .devcontainer/, etc.)grep: single-file grep/egrep/fgrep commands now satisfy the read-before-edit checkclaude agents dropping chat history and re-running the original promptclaude --bg occasionally failing with "socket missing" when the background daemon was cold-starting on a loaded machineclaude rm until the background daemon exitedclaude agents freezing for several seconds when returning to the session list due to the auto-updater re-checking on every exitclaude agents viewfile:///C:/... links being rewritten to a broken path on Windows terminals with hyperlink supportCLAUDE_CODE_ENABLE_AUTO_MODE opt-in instead of incorrectly blaming the model/effort ultracode incorrectly blaming the dynamic workflows setting when the model cannot run xhigh; ultracode is no longer offered on models that do not support it--model when running via the SDK or other hosts where the CLI flag doesn't applyp pasting on the line below instead of at the cursor when the register was yanked with v$claude agentsclaude rm/stop, idle reap) to send SIGTERM to running shell subprocesses before SIGKILL, so cleanup handlers runCLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE; the environment variable is now a no-opworkflow to ultracode. The word "workflow" no longer triggers a run; asking for one in your own words still works. The trigger keyword is highlighted in violet in the prompt inputExtended the existing custom roles framework by adding admin permissions. Admin permissions give members access to specific administrative areas, like billing or privacy, without the need to make them Owners.
max_tokens parameter to cap the advisor model's output per call, reducing latency and output token cost for workloads that don't need full-length responses.stop_reason: "refusal" without generated output are no longer billed.CLAUDE_CODE_ENABLE_AUTO_MODE=1.claude/skills directories are now automatically loaded, no marketplace requiredclaude plugin init <name> to scaffold a new plugin in .claude/skills/plugin arguments: subcommands, installed plugin names, and plugins from known marketplacesclaude agents: the agent field in settings.json is now honored for dispatched sessions, with --agent <name> to override itEnterWorktree can now switch between Claude-managed worktrees mid-sessiontool_decision telemetry events now include tool_parameters (bash commands, MCP/skill names) when OTEL_LOG_TOOL_DETAILS=1git worktree remove/prune can clean them upclaude agents completed sessions not retiring when an idle subagent was still parked or had leaked a backgrounded shellclaude agents pressing Esc not cancelling a slow "opening…", leaving the list unresponsive.claude/worktrees/ being orphaned after the 30-day job retention sweepclaude agents not reaching the system clipboard inside tmux with set-clipboard on (regression in 2.1.153)--resume not reporting background subagents that were running when the previous Claude Code process exited--resume session picker leaving its contents on the terminal after exiting in fullscreen mode--worktree and --worktree --tmux returning to the canonical repo root instead of the current linked worktree/model picker showing an incorrect "Newer version available" hint when the selected model is already the newest in its family; the pinned-model row now shows the model's description instead of its raw IDalt+v keybinding), screenshot paste on Windows 11, and added support for dragging images from Windows Explorer/terminal-setup now disables GPU acceleration in VS Code/Cursor/Windsurf integrated terminals to prevent garbled-text renderingclaude agents: slash-command autocomplete in the dispatch input now matches substrings/status and when a command is blockedClaude Managed Agents webhooks, multiagent orchestration, and self-hosted sandboxes are now available on Claude Platform on AWS. New IAM actions and AnthropicSelfHostedEnvironmentAccess managed policy added.
/workflows to view your runs/simplify now runs a cleanup-only review (reuse, simplification, efficiency, altitude) and applies the fixes, instead of running the full /code-review --fix bug-hunting review/effort slider labels from "Speed"/"Intelligence" to "Faster"/"Smarter" for clarityclaude agents: type ! <command> to run a shell command as a background session you can attach to and detach from. Also available as claude --bg --exec '<command>'claude agents: /logout now signs you out instead of being sent to a background session←← to open the agents view now works on Bedrock, Vertex, Foundry, and with telemetry disabled/chrome → "Select browser…", or in-chat when a browser action runs with multiple connecteddefaultEnabled: false in plugin.json or a marketplace entry; enable them with /plugin or claude plugin enable. Dependencies of enabled plugins are still enabled automatically/plugin Discover tab now pins plugins whose relevance signals match the current directory with a "suggested for this directory" annotationCLAUDE_CODE_SESSION_ID and CLAUDECODE=1 in their environmentclaude mcp list/get now show unapproved .mcp.json servers as ⏸ Pending approval instead of auto-approving and connecting when output is piped/remote-control autocomplete now shows "Disconnect Remote Control" when Remote Control is already active/claude-api skillCLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE (will be removed on 06/01). To use fast mode on Opus 4.6, switch with /model claude-opus-4-6[1m] and then /fast onrm -rf $HOME not being blocked as a dangerous path when HOME has a trailing slash$TMPDIR resolving to different directories in sandboxed vs unsandboxed Bash commands within the same sessionclaude agents when the Claude Code theme doesn't match the terminal background/command firesclaude --bg-pty-host processes spinning at 100% CPU after the daemon exits on macOSworktree.baseRef: "head" resolving to the main checkout's HEAD instead of the current worktree's HEAD when spawning subagents or calling EnterWorktree from inside a linked worktree[Image #N] / [Pasted text #N] placeholders when a plan-mode prompt starts with pasted images or textallowedMcpServers/deniedMcpServers entry in managed settings discarding all managed-settings policy; the bad entry is now dropped with a claude doctor warningCLAUDE_CODE_ALWAYS_ENABLE_EFFORT is setclaude.exe being in use showing a generic error instead of telling you to close other sessions and retryskipLfs option to github/git plugin marketplace sources to skip Git LFS downloads during clone and update/doctor lists the fixesCOLUMNS and LINES environment variables so scripts can size output to the terminal widthclaude agents: autocomplete in the dispatch input now suggests native slash commands and bundled skills, not just project skillsclaude agents: PR column now shows PR #N for a single PR or N PRs for multipleclaude doctor now shows the result of your last update attempttools/list (regression in v2.1.147)--strict-mcp-config, --bare, remote mode, enterprise managed MCP config, and managed-settings MCP server allow/deny policies--strict-mcp-config no longer strips inline mcpServers from explicitly-passed agent definitions (--agents / SDK agents), and blocked subagent MCP servers now surface a visible warningclaude update installing the latest version instead of the configured release channel's version for npm installationsclaude agents and claude --bg running on a stale daemon started before binary-takeover support, even after upgradingfile:// links in Claude's responses not being clickable in the terminalclaude --help rendering unwrapped output on terminals narrower than 92 columnsAgent tool with subagent_type: 'claude' running in an undocumented temporary worktree, which could silently discard outputs written to gitignored paths/bg while Claude is responding now continues the response in the background session instead of dropping it/btw keyboard shortcuts becoming unresponsive in background sessions while a task is running$CLAUDE_JOB_DIR triggering a "sensitive file" permission promptEnterWorktree not being available immediately in background sessions (previously required ToolSearch first)cmd+k in iTerm2/Terminal.app not repainting attached background sessions/copy and copy-on-select silently failing to update the system clipboard when attached to a background session inside tmuxclaude agents with Remote Control enabled leaving zombie session entries on the Code tab after exiting/rename in background sessions not updating the session banner immediately/model now saves your selection as the default for new sessions (matching the IDE). Press s in the picker to switch models for the current session only.modelPicker:setAsDefault keybinding, rename it to modelPicker:thisSessionOnly in keybindings.json (the d action was replaced by s)