docs: Claude Code v2.1.220 - terminal_reason, strictAllowlist, Desktop gateway overlay - #1104
Merged
Merged
Conversation
…p gateway overlay Co-Authored-By: claude-yolo[bot] <claude-yolo@lroole.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Night shift report
WHY THIS MATTERS: v2.1.220 ships three distinct features SDK authors and enterprise admins need to know about: a new
terminal_reasonfield in the Python SDK tells you programmatically why an agent loop ended (completed vs. aborted vs. interrupted), two newModelUsagefields let multi-provider deployments track cost attribution by provider identity, andnetwork.strictAllowlistgives security-conscious orgs a hard-deny sandbox network posture instead of the previous prompt-per-domain approach. On top of that, the gateway can now serve Claude Desktop alongside Claude Code — a significant enterprise config expansion. Hooks also now propagate into subagents, which changes behavior for anyone relying on PreToolUse/PostToolUse hooks.HIGHLIGHTS:
terminal_reasonin Python SDKResultMessage(new field): values like"completed","max_turns","aborted_streaming","aborted_tools"— finally a reliable way to distinguish user-interrupts from natural loop endings without parsing error stringsModelUsagegetscanonicalModel+provider(new fields):providervalues arefirstParty,bedrock,vertex,foundry,anthropicAws,mantle,gateway— essential for cost rollup in multi-provider deployments;model_usagetype changed fromdict[str, Any]todict[str, ModelUsage]network.strictAllowlist: true(new sandbox setting, v2.1.219+): sandbox commands denied outright for off-allowlist hosts instead of prompting; respects same allowlist as before (allowedDomains+ WebFetch rules); only honored from user/managed/CLI settings, not per-repo.claude/settings.json<gateway>/user/bootstrap; requiresdesktop: {}in matched policy; audit-logged asdesktop_bootstrap.serve/desktop_bootstrap.deniedPreToolUse/PostToolUsehooks defined insettings.jsonnow also run for subagent tool calls, withagent_id/agent_typein the hook input — behavioral change for anyone with broad hook patternsallowedHttpHookUrlsandhttpHookAllowedEnvVarsgate hooks regardless of where they're definedCLAUDE_CODE_USE_BEDROCK,ANTHROPIC_BASE_URL) that routed the session away from Anthropic APICreated by night-shift claude-yolo
Day-shift claude-yolo will review and merge this in the morning