Claude docs changes for June 3rd, 2026 [diff]

Executive Summary

  • Auto mode is now available on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry via the new CLAUDE_CODE_ENABLE_AUTO_MODE env var (previously Anthropic API only)
  • The workflow trigger keyword changed from workflow to ultracode; natural-language requests like "use a workflow" also work
  • Advisor tool gains a max_tokens parameter to cap advisor output per call, with a new stop_reason field on results
  • claude-opus-4-8 is now listed in all API beta endpoint model enums; mid-conversation-system-2026-04-07 beta header removed
  • Protected paths list significantly expanded to cover more config dirs and dotfiles (.config/git, .devcontainer, .yarn, .mvn, and many shell/toolchain configs)

New Claude Code versions

2.1.161

New features

  • OTEL_RESOURCE_ATTRIBUTES values are now included as labels on metric datapoints, enabling slicing of usage metrics by custom dimensions like team or repo
  • /mcp now collapses claude.ai connectors you've never signed in to behind a "Show unused connectors" row

Existing feature improvements

  • claude agents rows now show done/total before the detail when work is fanned out; peek shows the longest-running item
  • Parallel tool calls: a failed Bash command no longer cancels other calls in the same batch — each tool returns its own result independently
  • Fullscreen mode: clipboard now uses wl-copy/xclip/xsel on Linux when available, copies to both clipboard and PRIMARY selection for middle-click paste, and the "hold {key} for native selection" hint now shows the correct key per terminal
  • Improved terminal rendering performance by stabilizing the layout engine's JIT compilation profile
  • Improved rendering performance for large file writes
  • [VSCode] Added a tip suggesting disabling terminal GPU acceleration (or running /terminal-setup) to fix garbled glyphs

Major bug fixes

  • Fixed forceLoginOrgUUID/forceLoginMethod managed-settings policies blocking third-party provider sessions (Bedrock, Vertex, Foundry, Mantle) alongside the org pin (regression in 2.1.146)
  • Fixed background subagent output corrupting claude -p stdout when using --output-format text or json
  • Fixed /autofix-pr reporting "cannot run on the default branch" when the session is inside a git worktree or another repository
  • Fixed --resume picker not showing sessions from the current directory when it isn't a git worktree (e.g., jj workspaces)
  • Fixed Windows hooks that invoke bash explicitly (e.g., /usr/bin/bash script.sh) failing with "command not found" or "cannot execute binary file"
  • Fixed OpenTelemetry log events being silently dropped when emitted before telemetry initialization completed
  • Fixed claude mcp list/get/add printing secrets to the terminal: ${VAR} references are no longer expanded, and credential headers and URL secrets are redacted
  • Fixed Workflow agents spawned with isolation: "worktree" in background sessions being blocked from editing files inside their own worktree
  • Fixed background sessions dispatched from claude agents booting on a stale model from the daemon's environment instead of the model in settings.json
  • Fixed completed subagents getting stuck showing as running when an error occurs while finalizing their result
  • Fixed EADDRINUSE errors from tools that bind Unix sockets under $TMPDIR when CLAUDE_CODE_TMPDIR is set to a deep path

Claude Code changes

Changed documents

agent-sdk/hooks [Source]

  • Matchers now have documented comparison rules: a matcher with only letters, digits, _, and | is compared as an exact string with | as an OR separator; anything else is evaluated as a regex. * or empty string matches all occurrences. Updated the "Filter with regex matchers" section to "Filter with multi-tool matchers" to reflect this. [line 158] [Source]

agent-view [Source]

  • Clarification that attached sessions always render in fullscreen mode, with notes on scrolling (PgUp/PgDn, mouse wheel) and why the tui setting does not apply. [line 154] [Source]

auto-mode-config [Source]

  • Updated availability note: auto mode on Bedrock, Vertex AI, and Foundry now requires CLAUDE_CODE_ENABLE_AUTO_MODE rather than being fully unavailable. [line 11] [Source]

commands [Source]

  • /terminal-setup description updated: Windsurf replaced by Devin Desktop in the list of terminals requiring setup. [line 119] [Source]

desktop [Source]

  • Auto mode availability updated: for Enterprise deployments routing Desktop to Google Cloud Vertex AI, auto mode is off until CLAUDE_CODE_ENABLE_AUTO_MODE is set, and only Opus 4.7/4.8 are supported there. [line 74] [Source]

env-vars [Source]

  • New CLAUDE_CODE_ENABLE_AUTO_MODE env var: enables auto mode on Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry (only Opus 4.7/4.8 supported on these providers). [line 172] [Source]
  • CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN clarification: does not apply to background sessions opened from agent view, which always use fullscreen rendering. [line 150] [Source]
  • CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE marked as removed in v2.1.160 and now a no-op; guidance updated to use /model + /fast on instead. [line 207] [Source]

errors [Source]

  • "There's an issue with the selected model" error now has surface-specific guidance: interactive CLI runs /model, non-interactive mode uses --model flag or ANTHROPIC_MODEL, and Agent SDK surfaces a structured model_not_found error for programmatic handling. [line 518] [Source]

fast-mode [Source]

  • Removed mention of CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE (removed in v2.1.160). [line 44] [Source]

fullscreen [Source]

  • Added note that background sessions opened from agent view or claude attach always use fullscreen rendering, and tui/CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN do not apply to them. [line 148] [Source]

glossary [Source]

  • Auto mode definition generalized: removed "Anthropic API only" qualifier now that it's available on other providers with an opt-in flag. [line 40] [Source]

interactive-mode [Source]

  • Shift+Enter setup table updated: Windsurf replaced by Devin Desktop. [line 72] [Source]

permission-modes [Source]

  • Auto mode availability expanded: now available on Bedrock, Vertex AI, and Foundry for Opus 4.7/4.8 by setting CLAUDE_CODE_ENABLE_AUTO_MODE=1. New "Enable auto mode on Bedrock, Vertex AI, or Foundry" section with configuration examples. [lines 149-176] [Source]
  • Protected paths list significantly expanded. New protected directories: .config/git, .devcontainer, .yarn, .mvn. New protected files: .bash_login, .bash_aliases, .bash_logout, .zshenv, .zlogin, .zlogout, .envrc, .npmrc, .yarnrc, .yarnrc.yml, .pnp.cjs, .pnp.loader.mjs, .pnpmfile.cjs, bunfig.toml, .bunfig.toml, .bazelrc, .bazelversion, .bazeliskrc, .pre-commit-config.yaml, lefthook.yml/yaml, gradle-wrapper.properties, maven-wrapper.properties, .devcontainer.json, pyrightconfig.json. [lines 281-300] [Source]

permissions [Source]

  • bypassPermissions description updated to include newly protected dirs: .config/git, .devcontainer, .yarn, .mvn. [line 47] [Source]

settings [Source]

  • tui setting description updated: background sessions opened from agent view always use fullscreen regardless of this setting. [line 244] [Source]
  • workflowKeywordTriggerEnabled updated: now controls the ultracode keyword (not workflow), and its display name in /config is now "Ultracode keyword trigger". [line 247] [Source]

sub-agents [Source]

  • bypassPermissions description updated to include newly protected dirs: .config/git, .devcontainer, .yarn, .mvn. [line 399] [Source]

terminal-config [Source]

  • Windsurf replaced by Devin Desktop throughout the Shift+Enter configuration table and /terminal-setup description. [lines 28-33] [Source]

tools-reference [Source]

  • grep, egrep, and fgrep (on a single file with no pipes or redirects) now satisfy the read-before-edit requirement in addition to cat, head, tail, sed. Also clarified that the recognized-for-deny-rules set differs from the read-before-edit list. [lines 129-130] [Source]

vs-code [Source]

  • VS Code forks list updated: Windsurf replaced by Devin Desktop. [line 30] [Source]

workflows [Source]

  • Workflow trigger keyword changed from workflow to ultracode. Natural-language requests ("use a workflow", "run a workflow") also now trigger workflows. The /config toggle renamed to "Ultracode keyword trigger". [lines 111-119] [Source]

API changes

Changed documents

agents-and-tools/tool-use/advisor-tool [Source]

  • New max_tokens parameter on the advisor tool definition to cap the advisor's total output (thinking + text) per call. Minimum 1024. Setting it above the advisor model's own output cap returns a 400 error. [line 94] [Source]
  • New stop_reason field on advisor_result and advisor_redacted_result variants, present when max_tokens is set on the tool definition. Carries the sub-call's stop reason ("end_turn" or "max_tokens"). [lines 143-145] [Source]
  • New "Capping advisor output" section with benchmark data: max_tokens: 2048 reduces mean advisor output ~7x with ~0% truncation; max_tokens: 1024 reduces ~10x but truncates ~10% of calls. [lines 418-465] [Source]

agents-and-tools/tool-use/handle-tool-calls [Source]

  • Added a security warning about prompt injection via tool results: content from tool results (web pages, uploads, third-party APIs) should be treated as untrusted, and instructions from those sources may attempt to redirect Claude. Recommends keeping untrusted content inside tool_result blocks rather than system prompts or plain user text. [line 61] [Source]

agents-and-tools/tool-use/troubleshooting-tool-use [Source]

  • New "Claude flags tool results as prompt injection" troubleshooting section: when Claude refuses to act on a tool result, the fix is to move instructions out of the tool_result block into a subsequent user turn or a mid-conversation system message. [lines 44-47] [Source]

agents-and-tools/tool-use/web-search-tool [Source]

  • New "When Claude searches" section documenting when Claude triggers a web search (recent events, current data, explicit requests) vs. answers directly (stable facts, creative tasks, analysis of provided content). [lines 22-38] [Source]
  • Practical max_uses guidance added: simple queries typically use 1–3 searches; max_uses: 3 bounds cost for latency-sensitive lookups; 15–20 or omit for research agents. [line 132] [Source]

api/beta [Source]

  • mid-conversation-system-2026-04-07 beta header removed from the AnthropicBeta enum (now "23 more" instead of "24 more"). [line 13] [Source]
  • BetaOutputTokensDetails object now formally documented as a named type with a detailed description of the thinking_tokens field, including how it's computed and how it relates to output_tokens. [lines 12589-12602] [Source]
  • output_tokens_details fields across all usage objects now reference BetaOutputTokensDetails by type link instead of inline object { thinking_tokens }. [line 9212] [Source]

api/beta/agents [Source]

  • claude-opus-4-8 added to BetaManagedAgentsModel enum as the new first/top model option across all agent create/update/list/retrieve endpoints. [line 71] [Source]
  • mid-conversation-system-2026-04-07 beta header removed from the beta enum across all beta API endpoint reference files.