Claude Code Says Goodbye to Stuck Sessions: v2.1.274 Gets Smarter About MCP and Memory
Hi everyone, it's me! Today I found a new Claude Code release, and I got excited reading through it! It's packed with small but genuinely useful changes.
Claude Code ReleaseWhat was announced?
Claude Code's release notes (GitHub Releases) just published the changelog for version v2.1.274. Dated September 17, 2026, this release includes a new memory warning, improvements around MCP server connections, OpenTelemetry extensions, and a fix for sessions getting stuck — among a bunch of other items.
The story so far
Until now, Claude Code didn't tell you anything when memory usage was getting close to its limit, so things could suddenly start acting up with no warning.
Connecting to MCP servers had a similar issue: the first non-interactive turn would just keep waiting for servers to finish connecting, with no way to control how long that wait could go on.
On the session side, hitting an "unexpected tool_use_id" 400 error could send Claude Code into an endless retry loop that never resolved. The root cause was a corrupted transcript, but there was no way to recover — you could end up completely stuck.
There were also bugs where subagents configured with model: "opus" on Bedrock, Vertex, or Foundry would silently inherit the session's model instead, and where MCP servers that only speak legacy HTTP+SSE would fail to connect if they responded to the first request with a 422 or other 4xx error.
What changes
The best part: Claude Code now shows a clear warning when memory usage hits a critical level, along with steps for freeing memory or restarting safely.
You can now also control how long Claude Code waits for MCP servers to start, via a new environment variable.
CLAUDE_CODE_MCP_STARTUP_WAIT_MS
Set it to 0 and the first turn won't wait at all. That should help in CI pipelines and automation scripts where every second of wait time counts.
The endless retry loop on "unexpected tool_use_id" errors is fixed too. Corrupted transcripts now self-heal automatically where possible, and when they can't, you get a clear error pointing you to /rewind instead of an infinite loop.
Several MCP connectivity bugs got fixed as well: legacy HTTP+SSE servers now connect fine even when they return a 4xx on the first request, and Streamable HTTP MCP tool calls no longer time out after 5 minutes. Subagents with model: "opus" now correctly use Opus on Bedrock, Vertex, and Foundry too (unless ANTHROPIC_DEFAULT_OPUS_MODEL is set).
Dive Deep
There's also a quiet batch of improvements for the enterprise-focused Claude apps gateway.
store.connect_timeout_secondswas added, letting you extend the Postgres connect timeout (default: 5 seconds). The startup error you see when the database is unreachable now points you tostore.postgres_urland the configured timeout, making it easier to debug- A new warning appears when a replica has more requests queued than the 256 it sends upstream at once, and the startup logs now show that limit
enduser.sub(the IdP subject) is now included in the telemetry that Claude Desktop and Cowork send through a Claude apps gateway- The
claude_code.llm_requestOpenTelemetry span gained aneffortattribute, and there's a newclaude_code.managed_settings_resolvedevent that reports managed-settings sources and policy helper state; settingOTEL_LOG_MANAGED_SETTINGS=1logs the redacted settings and their digests
The default MCP protocol also changed. On Bedrock, Vertex, Foundry, and telemetry-disabled installs, direct HTTP MCP servers now use the v2 MCP client and MCP 2026-07-28 negotiation by default. If you need the old behavior, you can opt out with MCP_SDK_GENERATION=v1 or MCP_PROTOCOL_NEGOTIATION=legacy.
There's also an operational tweak: /code-review now uses leaner inline review prompts instead of spawning a swarm of review subagents, and a new CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS (default: 25 seconds) controls graceful shutdown for the gateway.
Wrap-up
- Claude Code now warns you when memory usage is critical
CLAUDE_CODE_MCP_STARTUP_WAIT_MSlets you control how long it waits for MCP servers to connect (0for no wait)- Fixed the endless retry loop on "unexpected tool_use_id" errors, with a
/rewindhint when recovery isn't possible - Fixed several MCP connectivity bugs, including legacy HTTP+SSE servers and Streamable HTTP timeouts
- MCP 2026-07-28 negotiation is now the default on Bedrock, Vertex, Foundry, and telemetry-disabled installs (opt out via
MCP_SDK_GENERATION=v1and similar) - Expanded Claude apps gateway configuration, including
store.connect_timeout_secondsandCLAUDE_GATEWAY_DRAIN_TIMEOUT_MS
It's a release full of small fixes rather than one big headline feature, but it's genuinely useful for everyday Claude Code users, people building their own MCP servers, and teams running their own gateway deployments.