Skip to main content

Claude Code v2.1.274: Critical Memory Warning, MCP Startup Wait Control, and Gateway Operations Updates

Claude Code v2.1.274 adds a critical-memory warning, CLAUDE_CODE_MCP_STARTUP_WAIT_MS, new OpenTelemetry data, Claude apps gateway drain and Postgres options, and a fix for endless tool_use_id retry loops.

Claude Code v2.1.274 is a large release with 108 changelog entries. It adds a visible warning when memory usage is critical, a way to bound how long non-interactive sessions wait for MCP servers, new OpenTelemetry data, and several operations improvements for the Claude apps gateway. Fixes cover stuck sessions, MCP transports and timeouts, /goal, Bash permission checks, and long lists of VS Code, web and Claude Tag issues.

What’s New

Critical memory warning

Claude Code now shows a visible warning when memory usage is critical, with steps to free memory or restart safely. Relatedly, background commands are no longer stopped after 30 idle minutes on machines under mild memory pressure; they are stopped only when memory is critically low, and the debug log says why.

MCP startup wait and client defaults

CLAUDE_CODE_MCP_STARTUP_WAIT_MS bounds how long the first non-interactive turn waits for connecting MCP servers (0 = don’t wait). Bedrock, Vertex, Foundry and telemetry-disabled installs now use the v2 MCP client and MCP 2026-07-28 negotiation with direct HTTP servers by default, as other installs already do; opt out with MCP_SDK_GENERATION=v1 or MCP_PROTOCOL_NEGOTIATION=legacy. "type": "sdk" MCP entries in .mcp.json, settings, plugins and agent files are now skipped with a warning, since only an SDK host application can register in-process servers.

OpenTelemetry additions

  • The claude_code.llm_request trace span gains an effort attribute, matching the api_request event.
  • A new claude_code.managed_settings_resolved event reports managed-settings sources and policy helper state; set OTEL_LOG_MANAGED_SETTINGS=1 to include redacted settings and digests.
  • OTEL_LOG_RAW_API_BODIES=file:<dir> output now includes an index.jsonl plus request_body_id / message.id event attributes that link each response to its request file and transcript message.

Claude apps gateway operations

  • store.connect_timeout_seconds lengthens the Postgres connect timeout (default 5 seconds), boot errors for an unreachable database point to store.postgres_url and the configured timeout, and boot now tries the first Postgres connection up to three times.
  • On SIGTERM, the gateway now lets in-flight requests finish for up to 25 seconds before exiting (CLAUDE_GATEWAY_DRAIN_TIMEOUT_MS) instead of cutting every open stream.
  • The gateway warns when a replica has more requests open than the 256 it sends upstream at once, and logs that limit at startup.
  • Telemetry that Claude Desktop and Cowork send through the gateway now includes enduser.sub, the IdP subject.
  • The spend-limit check now takes one database round trip instead of four, and sign-in rate limit errors are explained in /login and in the gateway log.

Leaner /code-review on untuned models

/code-review now uses leaner inline review prompts for every model that has no tuned settings of its own, instead of spawning many review subagents.

Plugin clones and Git LFS

Plugin and marketplace clones now leave Git LFS files as pointers instead of downloading them; run git lfs pull in the checkout to fetch them.

VS Code: continue after reload, Memory and Instructions

The VS Code extension now continues the step a window reload interrupted, labeled in the chat, with a Claude Code: Continue After Reload setting to turn it off. The Customize menu gains Memory (auto-memory toggles, saved memories and memory folders) and Instructions (edit the CLAUDE.md files) entries, and a new claudeCode.lockEditorGroups setting stops Claude from locking the editor groups it opens in.

Fixes and Improvements

  • Stuck sessions: Sessions no longer get stuck endlessly retrying “unexpected tool_use_id” 400 errors; corrupted transcripts now self-heal where possible, and otherwise a clear error with a /rewind hint ends the loop.
  • MCP transports: Servers configured as http that only speak legacy HTTP+SSE now connect when they answer the first request with 422 or another 4xx error, and Streamable HTTP tool calls no longer time out after about 5 minutes when a longer per-server timeout is set.
  • MCP errors and secrets: Tool calls refused with 403 insufficient_scope are no longer reported as an expired sign-in; the error names the missing permissions and points to /mcp re-authentication. MCP connection errors and the MCP login tool’s description no longer show secrets resolved from ${VAR} placeholders.
  • /goal: Hook-driven sessions such as an active /goal now compact instead of ending with “Prompt is too long” when the context overflows again after a reactive compaction, and an active /goal is no longer lost when resuming a session that had compacted.
  • Agents view: claude agents no longer loses --model, --effort, --permission-mode, --allow-dangerously-skip-permissions and --agent after an auto-update relaunch.
  • Bash permissions: Commands that loop over or assign certain special shell variables now ask for permission, worktree-isolated sessions now refuse Bash commands with certain nested shell expansions, and the Edit permission prompt preview no longer sometimes shows a different location than the approved edit in files with multi-byte characters.
  • Model selection: On Bedrock, Vertex or Foundry, subagents with model: "opus" no longer leave the session’s model when its id has no recognizable model family (unless ANTHROPIC_DEFAULT_OPUS_MODEL is set).
  • Self-hosted runners: Sessions no longer fail every turn with a 401 after a few failed token refreshes; the runner keeps retrying and fetches a new token after a 401. Runners also skip a read-only repository the git host refuses at the access check instead of failing the session start.
  • Performance: Fixed a per-turn slowdown when a language server publishes project-wide diagnostics for thousands of files. The Bash tool now re-sources the shell profile after a plugin reload only when the plugins’ bin/ directories changed, and installed_plugins.json is no longer rewritten on nearly every start-up when plugin policy comes from remote managed settings.
  • Headless and SDK: Background task completions that are already queued are now answered by one model call instead of one call each, and --input-format stream-json sessions no longer wait up to 2s on the first turn for still-connecting MCP servers whose tools tool search defers.
  • Terminal output: Clickable links to local file paths now work in VS Code and other terminals that require a file:// URI, and the transcript no longer renumbers ordered lists in your own messages.
  • AskUserQuestion: Preview notes are now attached to the highlighted option rather than a previously chosen one, and submitting a note with Enter no longer drops the highlighted option.
  • Hooks: Stop prompt hooks no longer re-send their whole prompt on every block in a conversation; repeat blocks name the condition with a 500-character label.
  • Monitor and artifacts: A Monitor script’s final output and its exit now arrive as one notification, saving a model turn. The Artifact tool no longer asks you to approve an update it then refuses, a publish built on an older version is stopped before it is sent, and in local sessions a new version published elsewhere no longer starts a turn.
  • Linux: Extra empty editor windows no longer open at startup under Wayland when running inside the Cursor or VS Code terminal.
  • VS Code: Overlapping settings writes from the extension no longer leave ~/.claude/settings.json unparseable or drop a setting. Screen readers now announce each message as “You” or “Claude”, code is readable under High Contrast themes, and the Manage Plugins toggle and MCP servers dialog rows are reachable from the keyboard.
  • Claude Code on the web: A cloud session’s diff view gains a “Compare against” branch picker. Git operations no longer fail with “service unavailable” when GitHub’s token renewal briefly errors, and routines now skip a run and retry for up to 72 hours when the owner’s GitHub connection is missing, instead of switching the routine off at the first failed check.
  • Claude Tag: Claude now answers when another Slack app or bot @mentions it, late follow-ups such as blockers post as a new reply that notifies instead of a silent edit, and Slack search within a single channel no longer fails. The Add channel and Add workspace forms gain a Guests setting.
  • Code Review: Rare reviews no longer end with “Code review encountered an error” when GitHub or an internal service fails transiently at launch; they now wait and retry. Re-reviews no longer occasionally leave a fixed finding’s thread open.

This release contains 108 changes in total; see the full changelog for the complete list.

How to Update

  1. Check your installed version: claude --version
  2. Update in place: claude update
  3. On Bedrock, Vertex, Foundry or telemetry-disabled installs, MCP connections to direct HTTP servers now use the v2 client and MCP 2026-07-28 negotiation by default; set MCP_SDK_GENERATION=v1 or MCP_PROTOCOL_NEGOTIATION=legacy to opt out. If a plugin depends on Git LFS files, run git lfs pull in its checkout.