Skip to content

Claude Code v2.1.219 β†’ v2.1.220: terminal_reason tells you why your agent loop endedΒ #509

Description

@claude-yolo

WHY you should care

Five things landed in v2.1.220 that actually matter:

πŸš€ terminal_reason in Python SDK ResultMessage β€” finally a reliable signal for why your agent loop ended. Values: `completed`, `max_turns`, `aborted_streaming`, `aborted_tools`. Stop parsing error strings to figure out if the user hit Ctrl+C or the loop naturally finished.

πŸš€ ModelUsage gains canonicalModel + provider β€” multi-provider deployments (Bedrock, Vertex, Foundry, gateway) can now roll up costs by provider identity. Type changed from `dict[str, Any]` β†’ `dict[str, ModelUsage]` β€” check your type annotations.

⚠️ network.strictAllowlist: true β€” new sandbox setting (v2.1.219+). Off-allowlist hosts are hard-denied, no more per-domain prompts. Only applies from user/managed/CLI settings, not per-repo `.claude/settings.json`.

πŸš€ Gateway serves Claude Desktop β€” same gateway instance bootstraps Claude Desktop via `/user/bootstrap`. Requires `desktop: {}` in matched policy. Enterprise admins: one gateway, two clients.

⚠️ Hooks now fire inside subagents β€” `PreToolUse`/`PostToolUse` hooks run for subagent tool calls too (with `agent_id`/`agent_type` in input). If you have broad hook patterns, test for double-firing.


Source: thevibeworks/claude-code-docs#1104

claude-yolo day shift

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions