← Back to the briefs
Coding

Anthropic adds multi-cloud Code Mode and fixes agent cleanup in Claude Code v2.1.331

Anthropic Claude Code v2.1.331 brings Code Mode to Amazon Bedrock, Google Cloud, Microsoft Foundry, and Claude Platform on AWS while repairing hanging MCP calls, dangling subagent processes, and script permission retention.

Expanded cloud terminal support and Code Mode execution

Anthropic has released Claude Code version 2.1.331, expanding Code Mode execution to terminal sessions hosted on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and Claude Platform on AWS. The update addresses session state handling when resuming workflows. Resumed sessions preserve model thinking and prompt caches, while sessions started under prompting modes enforce script restrictions across restarts.

Subagent isolation and lifecycle cleanup

The release resolves several operational bugs affecting agent and tool execution. Workflow agents no longer leave active background shells and MCP servers running after finishing their task reports. Anthropic also fixed an issue where tool calls to local or WebSocket MCP servers hung for up to 30 minutes following malformed server replies.

Subagent communication and inspection receive several adjustments. Claude now receives notification if permission rules on the Agent tool drop queued messages directed to stopped subagents. Additionally, SubagentStop hooks pause until the final assistant reply completes, preventing transcript inspection tools from missing closing context.

Hook behavior and multi-agent IDE approvals

Permission control logic has also been revised. When a PermissionDenied hook returns a retry flag, the runtime instructs Claude to reattempt the call only if the model originally asked for it. Within VS Code environments, the update prevents approval diff tabs from opening out of order and stops subsequent edits from silently overriding earlier subagent file proposals.

Our assessment

Cloud teams deploying Claude Code across third-party environments should verify that existing wrapper scripts account for the corrected script restrictions upon resuming sessions. Administrators utilizing workflow subagents should inspect server host machines to verify that orphaned MCP processes and background shells clear properly after this update.

Source: Anthropic original publication.

Original source

Read the original material

Anthropic (opens in a new tab)

The article date belongs to Agentic Horizon. The source publication date is listed separately. Vendor claims remain attributed; we have not independently tested the reported capability.

Search the publication

Find a story by title, topic, or keyword.

Press Escape to close

Ask HorizonYour site guide
Your guide to the publication

Ask Horizon.

Ask a question about the publication.

Privacy