Claude docs changes for April 22nd, 2026 [diff]
Executive Summary
- New
UserPromptExpansionhook event lets hooks intercept and block slash commands before they expand into prompts — filling a gap thatPreToolUsecouldn't cover for direct/skillnameinvocations. - SDK session storage is now supported via a
SessionStoreadapter interface, enabling session resume across machines, serverless functions, and multi-host deployments with S3, Redis, or Postgres backends. - Massive OpenTelemetry expansion in monitoring docs: full span attribute reference, seven new log events (permission mode changes, auth, MCP connections, hook execution, compaction, etc.), and a new
file:<dir>mode forOTEL_LOG_RAW_API_BODIESthat writes untruncated bodies to disk. - Voyage 4 embedding models added to the embeddings guide, including
voyage-4,voyage-4-large,voyage-4-lite,voyage-4-nano, andvoyage-multimodal-3.5with video support. - New "Debug your configuration" guide consolidates all configuration diagnostic commands and a symptom-first lookup table into one dedicated page.
New Claude Code versions
2.1.117
New features
- Forked subagents can now be enabled on external builds by setting
CLAUDE_CODE_FORK_SUBAGENT=1 - Agent frontmatter
mcpServersare now loaded for main-thread agent sessions via--agent - OpenTelemetry:
user_promptevents now includecommand_nameandcommand_sourcefor slash commands;cost.usage,token.usage,api_request, andapi_errornow include aneffortattribute when the model supports effort levels OTEL_LOG_RAW_API_BODIESnow supportsfile:<dir>mode for writing untruncated API bodies to disk instead of inline in events- Native builds on macOS and Linux:
GlobandGreptools replaced by embeddedbfsandugrepavailable through Bash — faster searches without a separate tool round-trip
Existing feature improvements
/modelselections now persist across restarts even when the project pins a different model; startup header shows when the active model comes from a project or managed-settings pin/resumecommand now offers to summarize stale, large sessions before re-reading them- Faster startup when both local and claude.ai MCP servers are configured (concurrent connect now default)
plugin installon an already-installed plugin now installs any missing dependencies instead of stopping at "already installed"- Plugin dependency errors now show "not installed" with an install hint;
claude plugin marketplace addnow auto-resolves missing dependencies from configured marketplaces - Managed-settings
blockedMarketplacesandstrictKnownMarketplacesare now enforced on plugin install, update, refresh, and autoupdate cleanupPeriodDaysretention sweep now also covers~/.claude/tasks/,~/.claude/shell-snapshots/, and~/.claude/backups/- Advisor Tool (experimental): dialog now carries an "experimental" label, learn-more link, and startup notification when enabled
- Windows: cached
where.exeexecutable lookups per process for faster subprocess launches - Default effort for Pro/Max subscribers on Opus 4.6 and Sonnet 4.6 is now
high(wasmedium)
Major bug fixes
- Fixed Plain-CLI OAuth sessions dying with "Please run /login" when the access token expires mid-session — token is now refreshed reactively on 401
- Fixed
WebFetchhanging on very large HTML pages by truncating input before HTML-to-markdown conversion - Fixed a crash when a proxy returns HTTP 204 No Content
- Fixed
/loginhaving no effect when launched withCLAUDE_CODE_OAUTH_TOKENenv var and that token expires - Fixed
NO_PROXYnot being respected for remote API requests when running under Bun - Fixed SDK
reload_pluginsreconnecting all user MCP servers serially - Fixed Bedrock application-inference-profile requests failing with 400 when backed by Opus 4.7 with thinking disabled
- Fixed subagents running a different model than the main agent incorrectly flagging file reads with a malware warning
- Fixed idle re-render loop when background tasks are present, reducing memory growth on Linux
- [VSCode] Fixed "Manage Plugins" panel breaking when multiple large marketplaces are configured
- Fixed Opus 4.7 sessions showing inflated
/contextpercentages and autocompacting too early (was computing against 200K instead of 1M context window)
Claude Code changes
New Documents
debug-your-config [Source]
New diagnostic guide for configuration issues. Covers using /context, /memory, /skills, /agents, /hooks, /mcp, /permissions, /doctor, and /status to inspect what loaded; how to check resolved settings scope precedence; debugging MCP servers and hooks; and a symptom-first lookup table for common configuration surprises (wrong hook matchers, standalone hook files, settings.json vs ~/.claude.json, etc.).
agent-sdk/session-storage [Source]
New guide on persisting SDK sessions to external storage so any host can resume them. Covers the SessionStore interface (append, load, and optional listSessions, delete, listSubkeys methods), quick start with InMemorySessionStore, writing custom adapters, reference implementations for S3/Redis/Postgres, dual-write architecture notes, and a conformance test suite for validating adapters.
Changed documents
agent-sdk/observability [Source]
claude_code.hookspan now requires detailed beta tracing (ENABLE_BETA_TRACING_DETAILED=1andBETA_TRACING_ENDPOINT) in addition to the standard variables. [line 101] [Source]- New section describing span hierarchy: subagent spans nest under the parent's
claude_code.toolspan when spawned via the Task tool. [lines 103-104] [Source] - New section on linking traces to your application via W3C trace context propagation (
TRACEPARENT/TRACESTATE). [lines 107-111] [Source] OTEL_LOG_RAW_API_BODIESadded to the sensitive-data opt-in table with description of inline (=1) and file (file:<dir>) modes. [line 144] [Source]
agent-sdk/python [Source]
effortfield inClaudeAgentOptionsdropsxhighas a valid value; newsession_storefield added accepting aSessionStoreadapter. [lines 758-759] [Source]AgentDefinitiongainsdisallowedTools,initialPrompt,maxTurns,background,effort, andpermissionModefields;modelnow accepts a full model ID in addition to aliases. [lines 969-980] [Source]- New note clarifying that
AgentDefinitionuses camelCase field names (matching the wire format), not Python snake_case. [lines 993-994] [Source]
agent-sdk/sessions [Source]
- Added note pointing to
SessionStoreadapter for resuming sessions across machines or serverless environments. [line 188] [Source]
agent-sdk/subagents [Source]
AgentDefinitionreference table gainsdisallowedTools,maxTurns,background,effort,permissionMode;modelnow accepts full model IDs;memoryfield no longer Python-only. [lines 107-120] [Source]- Added note that Python SDK
AgentDefinitionuses camelCase field names. [line 121] [Source]
agent-sdk/typescript [Source]
- New
sessionStoreoption added to theOptionsreference. [line 350] [Source] AgentDefinitiongainsinitialPrompt,background,memory,effort,permissionMode;modelnow accepts full model IDs. [lines 454-468] [Source]
claude-directory [Source]
- Troubleshoot section and "Check what loaded" section replaced with a single pointer to the new
debug-your-config.mdpage. [line 170] [Source]
data-usage [Source]
- New
WebFetch domain safety checksection explaining that the WebFetch tool sends each hostname toapi.anthropic.comfor blocklist checking before fetching; results cached for 5 minutes; runs regardless of provider; can be disabled withskipWebFetchPreflight: true. [lines 79-82] [Source] - New row added to the provider defaults table for the WebFetch domain safety check. [line 79] [Source]
env-vars [Source]
- New
CLAUDE_CODE_SIMPLE_SYSTEM_PROMPTenv var: uses the minimal system prompt fromCLAUDE_CODE_SIMPLEwithout disabling full tool set, hooks, MCP, or CLAUDE.md discovery. [line 125] [Source] OTEL_LOG_RAW_API_BODIESdescription updated to document the newfile:<dir>mode. [line 188] [Source]
hooks [Source]
- New
UserPromptExpansionhook event: fires when a slash command expands into a prompt before reaching Claude; matches oncommand_name; supportsdecision: "block"andadditionalContext; covers the path thatPreToolUsedoes not (direct/skillnameinvocations bypassPreToolUse). [lines 818-868] [Source] - Lifecycle diagram updated to include
UserPromptExpansionandPostToolUseFailure. [line 11] [Source] CwdChangedandFileChangedhook docs: removed the restriction that onlytype: "command"hooks are supported. [lines 1679, 1714]
hooks-guide [Source]
interactive-mode [Source]
mcp [Source]
- Claude.ai connectors settings URL updated from
claude.ai/settings/connectorstoclaude.ai/customize/connectors. [line 1584] [Source]
monitoring-usage [Source]
- New span hierarchy section with diagram showing
claude_code.interaction→llm_request/tool→tool.blocked_on_user/tool.executionnesting. [lines 120-130] [Source] - Full span attribute tables added for all span types:
claude_code.interaction,claude_code.llm_request,claude_code.tool,claude_code.tool.blocked_on_user,claude_code.tool.execution, andclaude_code.hook. [lines 134-214] [Source] - Seven new log events documented:
permission_mode_changed,auth,mcp_server_connection,internal_error,api_retries_exhausted,hook_execution_start,hook_execution_complete, andcompaction. [lines 578-644] [Source] OTEL_LOG_RAW_API_BODIESupdated throughout: now supportsfile:<dir>mode that writes untruncated bodies to disk and emits abody_refpath pointer in events instead of inlinebody. [lines 75-76] [Source]start_typeattribute added to session counter ("fresh","resume","continue"). [line 373] [Source]query_sourceandspeedattributes added toapi_requestandtokencounters;query_sourceadded toapi_requestandapi_errorevents. [lines 403-404] [Source]errorontool_resultevent split intoerror_type(always emitted) anderror(gated byOTEL_LOG_TOOL_DETAILS=1). [lines 476-477] [Source]- Plugin-installed and skill-activated events: third-party marketplace
plugin.name,plugin.version,marketplace.name, andskill.nameare now redacted unlessOTEL_LOG_TOOL_DETAILS=1. [lines 649-676] [Source]
network-config [Source]
downloads.claude.aiis now the primary download host;storage.googleapis.comdocumented as legacy used by older clients. [lines 97-99] [Source]- Added note that WebFetch calls
api.anthropic.comfor its domain safety check even on Bedrock/Vertex/Foundry deployments. [line 95] [Source]
permissions [Source]
- Clarification that
rm/rmdirtargeting/, the home directory, or other critical system paths still trigger a permission prompt even in auto-allow sandboxed mode. [line 251] [Source] - Auto mode classifier section updated: recommends CLAUDE.md for project-level behavioral rules;
autoModesettings block is for cross-project infrastructure rules. [lines 286-288] [Source]
plugin-dependencies [Source]
- Auto-reinstall behavior documented: if a dependency goes missing,
/reload-pluginsand background auto-update reinstall it automatically (if the marketplace is configured). [line 7] [Source] - New section on cross-marketplace dependencies: explains
allowCrossMarketplaceDependenciesOnfield inmarketplace.jsonthat must be set to allow auto-install of dependencies from another marketplace. [lines 39-62] [Source]
plugin-marketplaces [Source]
- New
allowCrossMarketplaceDependenciesOnarray field documented in the optional marketplace.json fields table. [line 180] [Source]
plugins-reference [Source]
UserPromptExpansionhook event added to the plugin hooks event table. [line 96] [Source]userConfigschema expanded: fields now requiretypeandtitle, and gain optionalrequired,default,multiple,min/maxproperties; the reference table is fully documented. [lines 396-407] [Source]
sandboxing [Source]
- Auto-allow mode description clarified:
rm/rmdirtargeting critical paths still trigger a permission prompt even when sandboxed. [line 83] [Source]
settings [Source]
- New
skipWebFetchPreflightsetting documented (skips the hostname safety check before WebFetch fetches a URL). [line 198] [Source] - macOS MDM: plist format clarified — top-level keys mirror
managed-settings.jsonwith nested settings as dictionaries and arrays as plist arrays. [line 82] [Source] /statusnow showsEnterprise managed settings (HKCU)for Windows user-level registry policies. [line 454] [Source]
skills [Source]
- New
argumentsfrontmatter field for named positional arguments; named substitution via$nameplaceholders documented. [lines 176-177] [Source] modelfrontmatter field clarified: override applies only for the current turn and is not saved to settings. [line 181] [Source]disable-model-invocation: truenow also prevents the skill from being preloaded into subagents. [line 178] [Source]
sub-agents [Source]
- Skills with
disable-model-invocation: truecannot be preloaded into subagents; missing or disabled skills are skipped with a debug log warning. [line 361] [Source] - Frontmatter hooks now also fire when the agent runs as the main session via
--agent, not only as a subagent. [line 475] [Source] Stophooks in frontmatter are only converted toSubagentStopwhen the agent is invoked as a subagent (not in main-session mode). [line 505] [Source]
terminal-config [Source]
/terminal-setupnow also setsterminal.integrated.mouseWheelScrollSensitivityin VS Code, Cursor, and Windsurf for smoother fullscreen scrolling; existing bindings are left in place rather than overwritten. [line 25] [Source]
troubleshooting [Source]
- Download host updated from
storage.googleapis.comtodownloads.claude.aithroughout installation troubleshooting steps. [lines 34-35] [Source]
API changes
Changed documents
build-with-claude/embeddings [Source]
- New Voyage 4 embedding model generation documented:
voyage-4-large,voyage-4,voyage-4-lite(optimized for latency/cost), andvoyage-4-nano(open-weight Apache 2.0 on Hugging Face), all with 32K context and flexible embedding dimensions. [lines 20-30] [Source] - New
voyage-multimodal-3.5documented with video support (first production-grade video embedding model) and flexible embedding dimensions; previousvoyage-multimodal-3retained as previous generation. [lines 47-48] [Source] - Code examples updated to use
voyage-4as the recommended model. [lines 84-184] [Source]
managed-agents/events-and-streaming [Source]
- New "Resuming an idle session" section: explains that session containers are checkpointed when idle (filesystem, packages, and files preserved); checkpoints retained for 30 days after last activity; resume by sending a
user.messageevent as usual. [lines 177-205] [Source]