Anthropic's Claude Code 2.1.337 adds git plugin installs, changes headless exit codes
Claude Code 2.1.337 lets /plugin install take git, HTTPS or owner/repo addresses and makes claude -p and SDK runs exit 1 when auto mode cannot check an action.
Anthropic's Claude Code 2.1.337, dated December 4, 2026, changes what a script sees when it runs Claude Code without someone at the terminal. According to the changelog, claude -p and SDK runs now end with is_error: true and exit 1 when auto mode could not check an action. The same release lets users install plugins from a git address and changes how the Artifacts server is allowed or blocked.
The exit-code change applies to headless runs. Auto mode is the setting in which Claude decides for itself whether an action is safe to run. The changelog describes a safety check that can be refused or blocked. A bug fix in the same release, covering VS Code, the desktop app's Code tab and background agents, says that when the safety check can't run, "Claude now asks you to approve most of them." Under 2.1.337, a headless run reports the failure in its result and in its exit status. Users who depend on the old behavior can set CLAUDE_CODE_DISABLE_UNCHECKED_ACTIONS_ERROR=1 to opt out. The changelog doesn't say how often checks fail in practice, so a team can't tell from the release notes how many jobs this will affect.
In the terminal, /plugin install now accepts a git@ address, an https:// address or an owner/repo address. According to the changelog, the plugin can then be used right away. Organizations can block plugins, and the release adds checks so that claude plugin install, claude plugin configure and /plugin install refuse options for a blocked plugin. Plugins installed from another terminal or by a SessionStart hook can now load into an open session without /reload-plugins.
Several MCP changes concern which servers may run. allowedMcpServers, the list that restricts which MCP servers may run, no longer blocks Claude Code's own Artifacts server. The denylist, deniedMcpServers, and the organization's Artifacts setting still block it. A new built_in field appears in the MCP server details that hooks receive. The changelog says Claude Desktop sets it on its own servers, "some of which run commands or control the computer." The entry doesn't say what hooks are expected to do with the field.
Self-hosted runners get a change in reporting. They now tell Anthropic's service when their host asks for another model provider, when the host defaults to plan or accept edits mode, or when managed settings ban auto mode. A separate change lets a session re-opened with nothing to run be released at --release-idle-session-min if that is sooner. A ready_idle_sessions metric counts such sessions.
Desktop, cloud and Remote Control sessions gain a Run in background option for a running skill, except on third-party providers. A skill's frontmatter can set background: false to keep it in the conversation. In the terminal, a Button can now hold Box and Image elements as one control, which the changelog calls picture cards for mods. The changelog uses the word "mods" without defining it.
The release lists 12 improvements and 85 bug fixes. One fixes --model default failing on Amazon Bedrock (Mantle) in headless runs when the newest Opus model is not enabled. Another fixes launches stopping when --allowedTools or --tools held an old tool name or a bare *, a regression the changelog dates to 2.1.333. Others cover memory use in terminal, desktop and VS Code sessions and in claude -p, and MCP tool calls after compaction on third-party providers, where Claude now knows which tools it had loaded and can load them again.
What changed
Headless claude -p and SDK runs now end with is_error: true and exit 1 when auto mode cannot check an action.
Type: Breaking change · Takes effect: Friday, December 4, 2026 · Applies to: Claude Code 2.1.337, claude -p, SDK
Why it matters
Scripts and pipelines that run claude -p or the SDK in auto mode may now see a non-zero exit when an action cannot be checked, which can break builds that previously passed. Plugin installs from git addresses also make it easier to pull third-party code into developer environments.
What you can do
Check CI jobs and automation that call claude -p or the SDK and confirm they handle exit code 1, or decide whether to set CLAUDE_CODE_DISABLE_UNCHECKED_ACTIONS_ERROR=1.
Original source
Where we saw it
Claude Code changelog
AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it. How it works