Claude Code 2.1.74
Enhanced `/context` command with actionable optimization suggestions — identifies context-heavy tools, memory bloat, and capacity warnings with specific remediation tips. This makes memory/capacity management observable and prescriptive rather than opaque.
New primitives
/context (enhanced)commandIdentifies context-heavy tools, memory bloat, and capacity warnings with specific optimization tips
autoMemoryDirectorysettingConfigure a custom directory for auto-memory storage
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MSenv-varConfigure timeout duration for `SessionEnd` hooks on exit
Workflow recipes
Long-lived agents can now observe memory state, configure where it persists, and control cleanup timing—unlocking automated memory governance for sustained workflows.
An agent or autonomous session could periodically invoke /context to sample memory bloat and context saturation, apply /context suggestions to trim tools or memory, reconfigure autoMemoryDirectory to offload to external storage if needed, and use SessionEnd hooks with extended timeout (via env-var) to ensure graceful cleanup on multi-hour runs. This closes the feedback loop on memory management—from opacity to prescribed optimization to configurable persistence.
Security policy enforcement and model specification are now consistent across agent frontmatter, JSON config, and CLI—enabling reliable multi-agent teams under managed settings.
An orchestration layer can now safely deploy agents with explicit model pinning (using full IDs like claude-opus-4-5) and trust that managed policy rules (e.g., ask gates) will not be bypassed by user allow rules. This enables guardrailed multi-agent workflows where each agent has a declared model and security policy is enforced top-down rather than locally overridden. Teams moving to managed instances can migrate agents without rewriting config.
Agentic relevance
The `autoMemoryDirectory` setting and enhanced `/context` command enable agents to audit and configure memory storage at runtime, critical for long-lived workflows. The env-var timeout control improves exit-time hook predictability. Hardening fixes around model IDs, OAuth, and managed policies strengthen agent reliability in multi-tenant and integration scenarios.
Hardening & fixes (14)
- Fixed memory leak where streaming API response buffers were not released when the generator was terminated early, causing unbounded RSS growth on the Node.js/npm code path
- Fixed managed policy `ask` rules being bypassed by user `allow` rules or skill `allowed-tools`
- Fixed full model IDs (e.g., `claude-opus-4-5`) being silently ignored in agent frontmatter `model:` field and `--agents` JSON config — agents now accept the same model values as `--model`
- Fixed MCP OAuth authentication hanging when the callback port is already in use
- Fixed MCP OAuth refresh never prompting for re-auth after the refresh token expires, for OAuth servers that return errors with HTTP 200 (e.g. Slack)
- Fixed voice mode silently failing on the macOS native binary for users whose terminal had never been granted microphone permission — the binary now includes the `audio-input` entitlement so macOS prompts correctly
- Fixed `/plugin install` failing inside the REPL for marketplace plugins with local sources
- Fixed marketplace update not syncing git submodules — plugin sources in submodules no longer break after update
- Fixed unknown slash commands with arguments silently dropping input — now shows your input as a warning
- Fixed Hebrew, Arabic, and other RTL text not rendering correctly in Windows Terminal, conhost, and VS Code integrated terminal
- Fixed LSP servers not working on Windows due to malformed file URIs
- Changed `--plugin-dir` so local dev copies now override installed marketplace plugins with the same name (unless that plugin is force-enabled by managed settings)
- [VSCode] Fixed delete button not working for Untitled sessions
- [VSCode] Improved scroll wheel responsiveness in the integrated terminal with terminal-aware acceleration
Raw changelog
## 2.1.74 - Added actionable suggestions to `/context` command — identifies context-heavy tools, memory bloat, and capacity warnings with specific optimization tips - Added `autoMemoryDirectory` setting to configure a custom directory for auto-memory storage - Fixed memory leak where streaming API response buffers were not released when the generator was terminated early, causing unbounded RSS growth on the Node.js/npm code path - Fixed managed policy `ask` rules being bypassed by user `allow` rules or skill `allowed-tools` - Fixed full model IDs (e.g., `claude-opus-4-5`) being silently ignored in agent frontmatter `model:` field and `--agents` JSON config — agents now accept the same model values as `--model` - Fixed MCP OAuth authentication hanging when the callback port is already in use - Fixed MCP OAuth refresh never prompting for re-auth after the refresh token expires, for OAuth servers that return errors with HTTP 200 (e.g. Slack) - Fixed voice mode silently failing on the macOS native binary for users whose terminal had never been granted microphone permission — the binary now includes the `audio-input` entitlement so macOS prompts correctly - Fixed `SessionEnd` hooks being killed after 1.5 s on exit regardless of `hook.timeout` — now configurable via `CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS` - Fixed `/plugin install` failing inside the REPL for marketplace plugins with local sources - Fixed marketplace update not syncing git submodules — plugin sources in submodules no longer break after update - Fixed unknown slash commands with arguments silently dropping input — now shows your input as a warning - Fixed Hebrew, Arabic, and other RTL text not rendering correctly in Windows Terminal, conhost, and VS Code integrated terminal - Fixed LSP servers not working on Windows due to malformed file URIs - Changed `--plugin-dir` so local dev copies now override installed marketplace plugins with the same name (unless that plugin is force-enabled by managed settings) - [VSCode] Fixed delete button not working for Untitled sessions - [VSCode] Improved scroll wheel responsiveness in the integrated terminal with terminal-aware acceleration