2.1.51 untested · changelog-derived

Claude Code 2.1.51

**`claude remote-control` subcommand** — enables external build systems and CI/CD pipelines to orchestrate Claude Code locally, expanding integration surface beyond direct user interaction to automated environments and distributed workflows.

8 new primitives 3 workflow recipes 5 fixes

New primitives

claude remote-controlcommand

Subcommand for external builds, enabling local environment serving for all users

Added `claude remote-control` subcommand for external builds, enabling local environment serving for all users.
CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MSenv-var

Configurable git timeout for plugin marketplace operations (default increased from 30s to 120s)

Updated plugin marketplace default git timeout from 30s to 120s and added `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS` to configure.
Custom npm registries + version pinningcapability

Support for custom npm registries and specific version pinning when installing plugins from npm sources

Added support for custom npm registries and specific version pinning when installing plugins from npm sources
BashTool login shell behaviorsetting

Skip login shell (`-l` flag) by default when shell snapshot is available (previously required `CLAUDE_BASH_NO_LOGIN=true`)

BashTool now skips login shell (`-l` flag) by default when a shell snapshot is available, improving command execution performance. Previously this required setting `CLAUDE_BASH_NO_LOGIN=true`.
CLAUDE_CODE_ACCOUNT_UUIDenv-var

Synchronously provide account UUID for SDK callers, eliminating race condition in early telemetry

Added `CLAUDE_CODE_ACCOUNT_UUID`, `CLAUDE_CODE_USER_EMAIL`, and `CLAUDE_CODE_ORGANIZATION_UUID` environment variables for SDK callers to provide account info synchronously, eliminating a race condition where early telemetry events lacked account metadata.
CLAUDE_CODE_USER_EMAILenv-var

Synchronously provide user email for SDK callers, eliminating race condition in early telemetry

Added `CLAUDE_CODE_ACCOUNT_UUID`, `CLAUDE_CODE_USER_EMAIL`, and `CLAUDE_CODE_ORGANIZATION_UUID` environment variables for SDK callers to provide account info synchronously, eliminating a race condition where early telemetry events lacked account metadata.
CLAUDE_CODE_ORGANIZATION_UUIDenv-var

Synchronously provide organization UUID for SDK callers, eliminating race condition in early telemetry

Added `CLAUDE_CODE_ACCOUNT_UUID`, `CLAUDE_CODE_USER_EMAIL`, and `CLAUDE_CODE_ORGANIZATION_UUID` environment variables for SDK callers to provide account info synchronously, eliminating a race condition where early telemetry events lacked account metadata.
Macros/Windows Registry managed settingscapability

Managed settings can now be set via macOS plist or Windows Registry

Managed settings can now be set via macOS plist or Windows Registry. Learn more at https://code.claude.com/docs/en/settings#settings-files

Workflow recipes

Remote-Controlled Agent Factories in CI/CD
claude remote-control + CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS + CLAUDE_CODE_ACCOUNT_UUID/CLAUDE_CODE_USER_EMAIL/CLAUDE_CODE_ORGANIZATION_UUID

External build systems (GitHub Actions, GitLab CI, Jenkins) can now spawn ephemeral Claude Code instances with full account context, enabling agents to reason over code generation tasks within CI/CD pipelines without manual API orchestration. The configurable git timeout and account UUID env-vars eliminate cold-start delays and telemetry race conditions that plague cloud-agent spawn workflows.

A GitHub Actions workflow spawns a Claude Code instance via claude remote-control, passes org/user/account context via env-vars, and deploys an agent that generates migration code, runs schema validation, and posts results back to the PR—all with native CLI latency and workspace access. The plugin marketplace timeout handles large monorepo submodule fetches that previously timed out.

Enterprise Deployment with OS-Level Settings Synchronization
Macros/Windows Registry managed settings + custom npm registries + BashTool login-shell optimization

Organizations can now centrally manage Claude Code configuration (registry mirrors, timeout policies, workspace trust rules) via macOS plist or Windows Registry, reducing per-machine setup variance. BashTool's automatic login-shell skip further improves command execution performance in enterprise CI/CD contexts where shell snapshots are available.

An enterprise MDM (Mobile Device Management) system deploys Claude Code via managed registry, sets CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS=180000 and custom npm registry URLs via plist/Registry, and disables login shell for all agents. Agents run faster, use approved registries, and avoid registry timeout footguns across the org.

Observability-First Agent Telemetry in Distributed Orchestration
CLAUDE_CODE_ACCOUNT_UUID + CLAUDE_CODE_USER_EMAIL + CLAUDE_CODE_ORGANIZATION_UUID

Agents spawned in parallel or distributed environments (Kubernetes, serverless) can now tag telemetry with account metadata *before* the first API call, eliminating the race condition where early telemetry events lack account context. This unblocks coherent observability over agent cohorts and audit trails for multi-agent workflows.

A parent orchestrator sets CLAUDE_CODE_ACCOUNT_UUID=<org-uuid>, CLAUDE_CODE_USER_EMAIL=<service-account@org>, and CLAUDE_CODE_ORGANIZATION_UUID=<org-uuid> when spawning a batch of agents for large-scale code review. All telemetry is tagged with org context from the first keystroke, enabling unified traces across the agent cohort and compliance audit for service-account actions.

Agentic relevance

The `claude remote-control` subcommand unlocks CI/CD and external build integration, enabling agents running in non-interactive environments to spin up local Claude Code instances for real-time code reasoning and generation. The three account-context env-vars (`CLAUDE_CODE_ACCOUNT_UUID`, `CLAUDE_CODE_USER_EMAIL`, `CLAUDE_CODE_ORGANIZATION_UUID`) eliminate telemetry race conditions for SDK callers, critical for agent-driven telemetry accuracy in concurrent workflows. Together with the improved plugin timeout and npm registry support, these primitives expand the surface for agentic automation in enterprise and distributed deployment contexts.

Hardening & fixes (5)

  • Fixed security issue where `statusLine` and `fileSuggestion` hook commands could execute without workspace trust acceptance in interactive mode.
  • Tool results larger than 50K characters are now persisted to disk (previously 100K). This reduces context window usage and improves conversation longevity.
  • Fixed bug where duplicate `control_response` messages (e.g. from WebSocket reconnects) could cause API 400 errors by pushing duplicate assistant messages into the conversation.
  • Fixed slash command autocomplete crashing when a plugin's SKILL.md description is a YAML array or other non-string type.
  • The `/model` picker now shows human-readable labels (e.g., "Sonnet 4.5") instead of raw model IDs for pinned model versions, with an upgrade hint when a newer version is available.

Raw changelog

## 2.1.51

- Added `claude remote-control` subcommand for external builds, enabling local environment serving for all users.
- Updated plugin marketplace default git timeout from 30s to 120s and added `CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS` to configure.
- Added support for custom npm registries and specific version pinning when installing plugins from npm sources
- BashTool now skips login shell (`-l` flag) by default when a shell snapshot is available, improving command execution performance. Previously this required setting `CLAUDE_BASH_NO_LOGIN=true`.
- Fixed a security issue where `statusLine` and `fileSuggestion` hook commands could execute without workspace trust acceptance in interactive mode.
- Tool results larger than 50K characters are now persisted to disk (previously 100K). This reduces context window usage and improves conversation longevity.
- Fixed a bug where duplicate `control_response` messages (e.g. from WebSocket reconnects) could cause API 400 errors by pushing duplicate assistant messages into the conversation.
- Added `CLAUDE_CODE_ACCOUNT_UUID`, `CLAUDE_CODE_USER_EMAIL`, and `CLAUDE_CODE_ORGANIZATION_UUID` environment variables for SDK callers to provide account info synchronously, eliminating a race condition where early telemetry events lacked account metadata.
- Fixed slash command autocomplete crashing when a plugin's SKILL.md description is a YAML array or other non-string type
- The `/model` picker now shows human-readable labels (e.g., "Sonnet 4.5") instead of raw model IDs for pinned model versions, with an upgrade hint when a newer version is available.
- Managed settings can now be set via macOS plist or Windows Registry. Learn more at https://code.claude.com/docs/en/settings#settings-files