# Claude Code 2.1.331 — Code Mode on cloud providers, API check in claude doctor

> Claude Code 2.1.331 opens Code Mode to cloud-provider users and adds a long list of fixes, most of them in VS Code.

- Org: Anthropic
- Date: 2026-11-23
- Category: tool
- Source: https://github.com/anthropics/claude-code/releases/tag/v2.1.331
- Canonical page: https://ai-tldr.dev/releases/anthropic-claude-code-2-1-331/

## In short

Claude Code 2.1.331 brings Code Mode to terminal sessions on Amazon Bedrock, Google Cloud, Microsoft Foundry and Claude Platform on AWS, adds an API check to claude doctor, and fixes MCP hangs and compaction losses.

## What it is

Code Mode now works in Claude Code terminal sessions on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and Claude Platform on AWS. Version 2.1.331 also adds an API connectivity section to claude doctor, which reports whether the API can be reached and with what HTTP status or error.

## How it works

Plugin manifests gain optionalDependencies: plugins that install with the plugin that lists them but can be turned off or removed on their own. Trace spans for claude_code.llm_request now carry gen_ai.usage, gen_ai.response.model and gen_ai.operation.name fields, and the Claude apps gateway can read groups with a small subset of JSONPath through oidc.groups_jsonpath.

## Why it matters

The fixes target real stalls: MCP tool calls that hung for up to 30 minutes on malformed replies, /compact losing part of its summary, a rewind deleting files after a failed restore, and silent replies failing cloud sessions. The VS Code extension adds Fix with Claude Code quick fixes and a Resolve Merge Conflicts action.

## Who it's for

Claude Code users on Bedrock, Google Cloud or Foundry, and VS Code users

## Try it

npm i -g @anthropic-ai/claude-code@2.1.331

## Links

- [Release Notes](https://github.com/anthropics/claude-code/releases/tag/v2.1.331)
- [Repository](https://github.com/anthropics/claude-code)
