Claude Code v2.1.336: large edits stop freezing, Enterprise managed hooks, and two timeout controls#

Published by

Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog

Claude Code 2.1.336, the release after 2.1.335, stops the editor from freezing when an edit or overwrite changes thousands of lines; very long diffs show their line counts, and ctrl+o opens the whole diff.[1] It also extends Enterprise Admin Console managed settings to hooks and a status line, and adds two environment variables that cap how long background and retrying commands wait.

Where sessions used to stall#

The freeze on huge edits is the broadest fix in the release: an edit or overwrite that touched thousands of lines could lock the interface, and now a very long diff is summarized by its line counts with the full view behind ctrl+o.[1] Several other stalls go away too. Exiting a worktree session could hang on a blank prompt for up to ten minutes when git was slow or stuck; subagents and /clear each waited 30 seconds before their first request in folders where git status is very slow; and tools from an HTTP MCP server could take up to 25 seconds to appear when the server never acknowledged its change-notification stream.[1] On Windows, stopping a Bash command now also stops the script and the programs it started, such as a running rm, instead of leaving them going.[1]

A background session no longer repeats work after a restart for a turn you stopped with Esc, a prompt you took back with Esc, or a turn that ended on purpose.[1] WebFetch stops reporting a domain as blocked when a proxy answers the safety check with its own page, and automatic compaction now prints a line when it gives up.[1]

Enterprise Admin Console settings reach further#

For organizations managed in Anthropic's Enterprise Admin Console, the managed settings Claude Code applies now include hooks and a status line, including hooks already saved in the console.[1] The release adds a base URL for Amazon Bedrock, Mantle, Google Cloud's Agent Platform, and Microsoft Foundry connections in those organizations, identity-provider sign-in for a Bedrock proxy through /login once an admin registers the /gateway-sign-in/callback address, and rows in /status for the chosen AWS profile and how the sign-in relates to your own ANTHROPIC_BASE_URL.[1]

A new managed setting, allowedAdminConsoleOrgUUIDs, applies an Enterprise Admin Console organization's settings after sign-in while still allowing API keys and tokens.[1]

New environment variables#

VariableWhat It Does
BASH_DEFAULT_BACKGROUND_TIMEOUT_MSSets the default time limit for background shell commands in Agent SDK and cloud sessions. Foreground command timeouts are left alone.[1]
CLAUDE_CODE_RETRY_WATCHDOG_MAX_SUBAGENT_MODEL_LIMIT_WAIT_MSCaps how long a subagent waits at some usage limits so unattended retry mode can end the wait instead of sleeping until the limit resets.[1]

Putting a ceiling on the wait#

Most of this release takes time back. The freeze on large edits, the ten-minute worktree hang, the 30-second git wait, and the 25-second MCP delay were all places a session sat idle; each now ends promptly. The two new variables draw the same line for the paths where a stall is hardest to see. A background command in an Agent SDK or cloud run and a subagent parked at a usage limit are both unattended by definition, so a default timeout and a wait cap give the operator a number where there was previously an open-ended wait. An unattended run can now be told to move on rather than block until a limit resets.

This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners.

Sources#

  1. Claude Code Official Changelog, v2.1.336 release notes

Previous Claude Code analysis: v2.1.335 (December 3, 2026)

All 97 Claude Code analyses: Claude Code Version Tracker · Official Claude Code changelog

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy