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 inputsrequiredMinimumVersion 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 inputCLAUDE_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 blocked/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)/code-review --fix now applies review findings to your working tree after the review, surfacing reuse, simplification, and efficiency suggestions; /simplify now invokes /code-review --fixdisallowed-tools in frontmatter to remove tools from the model while the skill is active/reload-skills command to re-scan skill directories without restarting the sessionSessionStart hooks can now return reloadSkills: true to re-scan skill directories, making skills installed by the hook available in the same sessionSessionStart hooks can now set the session title via hookSpecificOutput.sessionTitle on startup and resumeMessageDisplay hook event that lets hooks transform or hide assistant message text as it is displayedpluginSuggestionMarketplaces managed setting: admins can allowlist org marketplaces whose plugins may be suggested via context-aware tipsclaude plugin marketplace remove now accepts --scope user|project|local for symmetry with marketplace add, install, and uninstall--fallback-model for the rest of the session when the primary model is not found, instead of failing every request/ in NORMAL mode now opens reverse history search (like Ctrl+R), matching bash/zsh vi-mode/usage breakdown now includes large session files; files are scanned with a streaming read so memory usage stays flatCtrl+O shows the full thinking)app.entrypoint, opt-in via OTEL_METRICS_INCLUDE_ENTRYPOINT=true)/doctor reporting "marketplace not found" or "plugin not found" for stale enabledPlugins entries referencing removed marketplaces or dropped plugins--bare or with attachments disabledclaude agents when accepting a stale permission prompt after a subagent was cancelledcache_creation_input_tokens reporting as 0 in transcript and result usage when the API reports cache writes only via the nested cache_creation breakdown/usage now shows a per-category breakdown of what's driving your limits usage — skills, subagents, plugins, and per-MCP-server cost/diff detail view can now be scrolled with the keyboard (arrows, j/k, PgUp/PgDn, Space, Home/End)- [ ] todo / - [x] done) instead of plain bulletsallowAllClaudeAiMcps managed setting to load claude.ai cloud MCP connectors alongside managed-mcp.jsoncd functions (cd.., cd\, cd~, X:) changed the working directory undetected, letting a later command read outside the workspace.git directory (with hooks/ and config denied)PowerShell(dotnet.exe build *)) not pre-approving native executables and scriptsPWD/OLDPWD/DIRSTACK across cd/pushd/popdfind in the Bash tool exhausting the macOS system file/vnode table and crashing the host on large directory trees/ultraplan and remote session creation failing with "Could not capture uncommitted changes" when the working tree has no real changesotelHeadersHelper failing silently when the script path contains spaces; helper failures are now reported in /doctor and the debug logname: differs from its directory basename/effort setting instead of the effort level applied by skill/agent effort: frontmatter/config exit summary reporting phantom changes to auto-compact and theme when toggling unrelated settings/insights crashing when cached session-meta files are missing optional fieldsclaude --resume/feedback reports to include the conversation that happened before context compaction, making issues from earlier in long sessions easier to triageWorkflow tool for deterministic multi-agent orchestration. It is off by default — set CLAUDE_CODE_WORKFLOWS=1 to enableCtrl+T in claude agents) now stay alive when idle, are restarted in place to apply Claude Code updates, and are shed under memory pressure only after non-pinned sessions/simplify to /code-review. It now reports correctness bugs at a chosen effort level (e.g., /code-review high); pass --comment to post findings as inline GitHub PR comments. The old cleanup-and-fix behavior has been removedforceLoginOrgUUID and forceLoginMethod managed-settings) not being enforced against third-party-provider and API-key sessions& in ! command output displaying as &, which broke copy-pasting URLs from commands like gcloud auth login on headless machines/help rendering a broken tab header and showing only one command per page on small terminals when not in fullscreen modeAgent(...) types in tools: frontmatter dropping all but the last entryif conditions like PowerShell(git push*) never matching — only PowerShell(*) workedpwsh is installed via winget or the Microsoft Store/effort opening with the slider on the wrong level — it now starts at your current effort/background refusing sessions whose only typed input was a skill or custom slash commandAskUserQuestion when the user or a skill explicitly relies on it; the auto-mode classifier now sees the user's answers as intent signal/theme "New custom theme" and color editor dialogs not responding to Esc[Pasted text #N] placeholder instead of the actual contentclaude plugin details and /plugin being doubled when a plugin's manifest listed paths overlapping its default directoriesCLAUDE_CODE_SUBAGENT_MODEL not applying to teammate processes spawned by agent teams/plugin, /status, /mobile, /sandbox, and /permissions menus/simplify to /code-review with an optional effort level (e.g. /code-review high)AskUserQuestion when the user or a skill explicitly relies on itpwsh is installed via winget or the Microsoft Store (regression in v2.1.124)resources/list, resources/templates/list, and prompts/list dropping items past page 1 on paginating servers/background refusing sessions whose only typed input was a skill or custom slash command/theme color editor and "New custom theme" dialogs not responding to EscforceLoginOrgUUID and forceLoginMethod managed-settings policies not being enforced against third-party-provider and API-key sessionsCLAUDE_CODE_SUBAGENT_MODEL not being forwarded to child processes in multi-agent sessionsFixed WebFetch permission rules not being applied to preapproved domains, Windows permission rules with backslashes and case variants, and…
Anthropic · Claude CodeFixed bash commands failing under Bazel and EDR-protected Go workflows due to $TMPDIR override regression, and fixed failures on Windows wi…
Anthropic · Claude Code