WHY you should care
v2.1.220 meaningfully expands the Agent SDK surface area for anyone building production agents programmatically.
π The big three
getContextUsage() SDK API β context window breakdown (token counts, categories, skills) is now reachable programmatically via Query.getContextUsage(). Previously interactive-only. Useful for adaptive context management in long-running agents.
PermissionRequest hook β hooks can now intercept permission prompts before they reach the user and auto-allow/deny them. Background subagents that can't prompt a user now auto-deny if no hook returns a decision. Critical for headless/CI workflows.
Deep subagent forwardSubagentText β messages from subagents at every nesting depth (not just depth-1) now propagate in the stream with parent_tool_use_id set. Fixes a real gap for multi-level agent trees.
Other notable additions
cancel_queued interrupt: cancel queued messages outright instead of letting them run after interrupt
fast_mode_disabled_reason: surface the specific reason fast mode is blocked, not just the state
setModel(undefined): now documented to reset to session default
supportedCommands() now reflects mid-session changes live
settings.local.json auto-added to global git excludes when saved
strictKnownMarketplaces admin setting for plugin marketplace lockdown
- Error retry semantics explicitly documented (TLS cert failures, mid-stream failures)
Ref
PR: thevibeworks/claude-code-docs#1108
WHY you should care
v2.1.220 meaningfully expands the Agent SDK surface area for anyone building production agents programmatically.
π The big three
getContextUsage()SDK API β context window breakdown (token counts, categories, skills) is now reachable programmatically viaQuery.getContextUsage(). Previously interactive-only. Useful for adaptive context management in long-running agents.PermissionRequesthook β hooks can now intercept permission prompts before they reach the user and auto-allow/deny them. Background subagents that can't prompt a user now auto-deny if no hook returns a decision. Critical for headless/CI workflows.Deep subagent
forwardSubagentTextβ messages from subagents at every nesting depth (not just depth-1) now propagate in the stream withparent_tool_use_idset. Fixes a real gap for multi-level agent trees.Other notable additions
cancel_queuedinterrupt: cancel queued messages outright instead of letting them run after interruptfast_mode_disabled_reason: surface the specific reason fast mode is blocked, not just the statesetModel(undefined): now documented to reset to session defaultsupportedCommands()now reflects mid-session changes livesettings.local.jsonauto-added to global git excludes when savedstrictKnownMarketplacesadmin setting for plugin marketplace lockdownRef
PR: thevibeworks/claude-code-docs#1108