↓ Skip to main content
  1. Articles/

Claude Code v2.1.331: API Connectivity Checks in doctor, an MCP Hang Fix, and Code Mode Spreads

·937 words·5 mins·
Florent Clairambault
Author
Florent Clairambault
CTO & software engineer — writing daily about spec-driven development and agentic coding

Most Claude Code releases are small. The useful ones are small in a specific way: they remove the failure modes that waste an autonomous run. v2.1.331 is one of those. It has no headline feature. It has a handful of changes that matter if you run agents unattended.

Method note: everything below comes from the public changelog in the anthropics/claude-code repository. The file is very large and I read a condensed view of the newest entries, not every bullet. I have not installed or tested 2.1.331. Treat this as a reading of the release notes, not a hands-on review.

The change I care most about: MCP calls no longer hang on malformed replies
#

The changelog lists a fix for MCP tool calls hanging when a server returns a malformed reply. This is the kind of bug that hurts agentic workflows most. An interactive user sees a spinner and hits Ctrl-C. An unattended agent, such as a scheduled routine, a CI job or a self-hosted runner, just sits there. It burns wall-clock time, and may burn budget, until something outside the agent kills it.

If you write your own MCP servers, the lesson still applies. Validate your responses. A server that emits a half-formed JSON-RPC reply used to be able to stall the whole session. Even with this fix, a test that feeds your server’s output through a strict schema check is cheap insurance.

claude doctor checks API connectivity
#

claude doctor now includes an API connectivity check. This sounds minor until you work behind a corporate proxy, a gateway or a locked-down runner. The usual failure is “Claude Code starts, then nothing works”, and the cause could be DNS, a TLS-intercepting proxy, a blocked host or a bad credential.

A connectivity check in the diagnostic command gives you a first step you can script. For a team rolling Claude Code out to many machines, you can add it to onboarding:

claude doctor

Run it on a fresh machine or a new runner image before you debug anything else. It will not fix a network policy, but it should tell you quickly whether the problem is the network or your configuration.

The same release also adds a setting to request uncompressed responses behind some proxies. That points at the same problem: middleboxes that mangle compressed streams. If you have seen truncated or garbled output only on one network, this setting is worth a look.

Code Mode keeps spreading
#

Code Mode is still experimental. In 2.1.331 it gains support in terminal sessions on several cloud platforms. The changelog also adds a gateway option for reading groups from lists of objects. I cannot say more about that option from the notes alone, so I won’t guess at its behavior.

The direction is clear, though. Anthropic keeps pushing Code Mode, where the model writes and runs scripts instead of making one tool call per step, toward the environments enterprises actually use: Bedrock, Google Cloud, Foundry and gateway setups. Earlier releases (2.1.328 and 2.1.329) made the same push with auto mode and with Code Mode memory and time limits. This is the pattern I’d watch: the experimental features arrive first, then the guardrails, then the platform coverage.

Smaller items worth knowing
#

  • Voice dictation notice. Claude Code now tells you when dictation stops on its own. A silent stop is easy to mistake for the agent ignoring you.
  • Extra telemetry attributes on LLM request traces. If you export OpenTelemetry data, you get more fields to slice by. Check your dashboards and any cardinality limits before you turn this on in production.
  • Terminal layout fixes. The notes mention layout problems in short or narrow terminals, which matters if you run Claude Code in tmux panes or split views.
  • Rewind and compaction edge cases. The changelog lists several fixes. Anyone who has lost context to a bad compaction knows this is not cosmetic. I can’t tell you from the notes how many of these were data-loss bugs.
  • /diff and /bug display fixes. Minor, but /diff is how you review what the agent did.

VS Code changes
#

The VS Code extension gets new notebook, quick-fix and merge-conflict actions, plus a large batch of fixes to the chat panel, diffs and keyboard handling. Merge-conflict handling is the one I’d test first. Resolving conflicts is a task agents are good at, but it is also where silent mistakes land in your main branch. Review the resolution diff, not just the agent’s summary of it.

What this release tells you
#

Two themes recur across the recent 2.1.32x and 2.1.33x releases:

  1. Reliability for unattended runs. Hang fixes, diagnostics, proxy settings and runner options all serve the same user: someone who is not watching the terminal.
  2. Enterprise plumbing. Admin Console sign-in in 2.1.330, gateway and platform support in this release. Anthropic is filling in the boring parts that decide whether a security team approves a rollout.

This is why I keep arguing that the terminal-native agent model wins. The work that makes an agent trustworthy is mostly operational: timeouts, diagnostics, permission boundaries and observability. An IDE plugin that expects a human to notice a stuck spinner doesn’t need most of that. An agent you leave running overnight does.

Should you upgrade?
#

Probably, if you run MCP servers you don’t control or use Claude Code on runners and in CI. The hang fix alone justifies it. If you depend on a stable workflow, read the full changelog first. The 2.1.331 entry is long, and I only saw a summary. Pin versions on shared runners and upgrade deliberately.

Sources
#

AI Tools

Claude Code v2.1.329: Code Mode Gets Guardrails, /tasks Becomes a Control Panel, and /code-review Stops Guessing

Claude Code v2.1.329 is a hardening release: Code Mode gets memory limits and clearer failure semantics, /tasks now covers scheduled tasks, /loop wakeups and forks, and /code-review reads the actual pull request via gh pr diff or says it can’t. Based on the official changelog only; I have not run this version.

Nov 20, 2026 · 7 min read

AI Tools

Claude Code v2.1.330: Enterprise Sign-In, 30-Day /loop Runs, and Safer rm and Worktree Handling

Claude Code v2.1.330 adds sign-in to organizations managed in the Enterprise Admin Console, extends /loop and recurring tasks from 7 to 30 days, asks approval for more rm commands, and fixes a bug where ExitWorktree could delete a worktree another session was using. Based on the official changelog only; I have not run this version.

Nov 21, 2026 · 7 min read

AI Tools

Claude Code v2.1.328: Auto Mode Reaches Bedrock, Foundry and Google Cloud, and MCP Hooks Can Fail Closed

Claude Code v2.1.328 extends auto mode to Opus 4.6 and Sonnet 4.6 on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry and the Claude apps gateway, adds “onFailure”: “block” for mcp_tool hooks, and narrows /code-review to bugs and CLAUDE.md violations. Based on the official changelog only; I have not run this version.

Nov 19, 2026 · 6 min read

AI Tools

Claude Code v2.1.327: The Data-Loss Release, Plus Tighter Path and Auto Mode Rules

Claude Code v2.1.327 fixes several silent data-loss bugs (.mcp.json key deletion, /export overwrites, git-ignored files removed on Remote Control stop), refuses some symlinked paths, ignores more package-runner allow rules in auto mode, and says the billed-classifier fallback will be removed. Based on the official changelog only; I have not run this version.

Nov 18, 2026 · 6 min read

AI Tools

Claude Code v2.1.326: Auto Mode Becomes the Fallback, and Credentials Files Get a Guard

Claude Code v2.1.326 (Nov 16) lets Code Mode run alongside agent teams, starts sessions in auto mode when no mode is set and organization policy hasn’t loaded, and blocks file tools from writing to sign-in files like .credentials.json. Based on the official changelog only; I have not run this version.

Nov 17, 2026 · 3 min read