2.1.152 untested · changelog-derived

Claude Code 2.1.152

**`/code-review --fix` and hook-driven skill lifecycle management unlock tighter agent self-repair loops**: code review findings can now be automatically applied to the working tree, and hooks can inject skills mid-session and set message transformations—together enabling agents to review their own diffs, apply hardening suggestions, and suppress noisy output.

13 new primitives 3 workflow recipes 20 fixes

New primitives

/code-review --fixflag

Applies review findings to your working tree after the review, surfacing reuse, simplification, and efficiency suggestions

`/code-review --fix` now applies review findings to your working tree after the review, surfacing reuse, simplification, and efficiency suggestions; `/simplify` now invokes `/code-review --fix`
disallowed-tools in frontmattersetting

Remove tools from the model while the skill is active

Skills and slash commands can now set `disallowed-tools` in frontmatter to remove tools from the model while the skill is active
/reload-skillscommand

Re-scan skill directories without restarting the session

Added `/reload-skills` command to re-scan skill directories without restarting the session
SessionStart hook: reloadSkills: truehook return

Re-scan skill directories, making skills installed by the hook available in the same session

`SessionStart` hooks can now return `reloadSkills: true` to re-scan skill directories, making skills installed by the hook available in the same session
SessionStart hook: hookSpecificOutput.sessionTitlehook return

Set the session title via hook on startup and resume

`SessionStart` hooks can now set the session title via `hookSpecificOutput.sessionTitle` on startup and resume
MessageDisplay hook eventhook type

Transform or hide assistant message text as it is displayed

Added a `MessageDisplay` hook event that lets hooks transform or hide assistant message text as it is displayed
pluginSuggestionMarketplacesmanaged setting

Admin allowlist for org marketplaces whose plugins may be suggested via context-aware tips

Added `pluginSuggestionMarketplaces` managed setting: admins can allowlist org marketplaces whose plugins may be suggested via context-aware tips
--scope user\project\

local` for `claude plugin marketplace remove`

flag
--fallback-model session persistencecapability

Switch to fallback model for the rest of the session instead of failing every request

Claude Code now switches to your configured `--fallback-model` for the rest of the session when the primary model is not found, instead of failing every request
Auto mode consent removalcapability

Auto mode no longer requires opt-in consent

Auto mode no longer requires opt-in consent
Vim mode: / in NORMALkeybinding

Open reverse history search (like Ctrl+R), matching bash/zsh vi-mode

Vim mode: `/` in NORMAL mode now opens reverse history search (like Ctrl+R), matching bash/zsh vi-mode
/usage large session filescommand enhancement

Includes large session files in breakdown; scanned with streaming read for flat memory usage

The `/usage` breakdown now includes large session files; files are scanned with a streaming read so memory usage stays flat
OTEL_METRICS_INCLUDE_ENTRYPOINT=trueenv var

Include session entrypoint as an OpenTelemetry metric attribute

Added the session entrypoint as an OpenTelemetry metric attribute (`app.entrypoint`, opt-in via `OTEL_METRICS_INCLUDE_ENTRYPOINT=true`)

Workflow recipes

Autonomous Code Hardening Loop
/code-review --fix + disallowed-tools in frontmatter + MessageDisplay hook

Code review suggestions are often ignored or require manual application. By combining automatic fix application, tool-suppression during review-heavy phases, and hook-driven output transformation, agents can run self-contained hardening cycles that review their own work, apply fixes, suppress noise, and surface only the final outcome.

An agent skill that (1) runs /code-review --fix on a target file/branch, (2) uses disallowed-tools to disable write tools during analysis, forcing the agent into read-only review mode, (3) applies a MessageDisplay hook to collapse verbose intermediate reasoning, and (4) surfaces only the delta and quality assessment to the user. Enables fully autonomous code polish without user supervision.

Dynamic Skill Injection with Session Context
SessionStart hook reloadSkills: true + hookSpecificOutput.sessionTitle + /reload-skills

Most skills are static; they can't adapt to the session's purpose or load new capabilities on demand. By having hooks inject skills mid-session and set the session title to reflect the active skill set, agents can dynamically reconfigure their tooling and make their mode transparent to the user.

A hook that runs on session start, detects the user's goal (from session title or query), injects the appropriate skill bundle (e.g., "research", "coding", "documentation"), sets reloadSkills: true to make them available immediately, and updates the session title to reflect the active mode. If the goal changes, /reload-skills refreshes the available skill set. Enables session-adaptive tool availability.

Suppressed Output Audit Agent
MessageDisplay hook + --scope user|project|local marketplace control + /usage large file scanning

Audit and diagnostic agents often produce verbose intermediate logs and intermediate findings that obscure the final result. A MessageDisplay hook can filter or hide diagnostic output while preserving the final report. Combined with scoped marketplace policies and transparent session usage tracking, this enables compliance agents to run noiseless audits with full auditability.

An audit agent skill that (1) uses a MessageDisplay hook to suppress or reformat diagnostic output (keep only final findings), (2) respects org marketplace restrictions via pluginSuggestionMarketplaces to ensure only approved tools are suggested, and (3) runs /usage at the end to show token budget and file scan counts. Result: clean audit reports with transparent resource usage and compliance-aware tooling.

Agentic relevance

2.1.152 surfaces three capabilities with high agent-automation value: `/code-review --fix` enables automated self-repair loops where agents can review their own diffs and apply hardening suggestions directly; `MessageDisplay` hooks enable output suppression and transformation for structured tool interaction; and hook-driven skill injection (`reloadSkills: true`) allows agents running inside hooks to install capability mid-session. Together these enable tighter feedback loops in autonomous workflows.

Hardening & fixes (20)

  • Fixed terminal styling degrading in very long sessions by recycling the renderer's style pool
  • Fixed the sandbox-enabled warning not appearing in condensed startup mode — it now shows in every layout
  • Fixed the loading spinner showing "still thinking"/"almost done thinking" while a tool is running, and reset the thinking status to "thinking" after each tool
  • Fixed focus mode showing a spurious "N messages hidden" count on turns with no hidden activity
  • Fixed clicking a link inside an expanded tool result collapsing the section instead of opening the link
  • Fixed markdown table cell borders inheriting the color of inline code, wrapped continuation lines losing their style, and empty header cells showing a label in the narrow-terminal stacked layout
  • Fixed plugin MCP servers with the same command but different environment variables being incorrectly deduplicated
  • Fixed `/doctor` reporting "marketplace not found" or "plugin not found" for stale `enabledPlugins` entries referencing removed marketplaces or dropped plugins
  • Fixed plugins that track a git branch silently no longer receiving updates after the plugin registry was rebuilt
  • Fixed remote MCP servers failing to connect in Claude Code Remote sessions when the egress proxy is enabled
  • Fixed the effort-change confirmation dialog appearing when the conversation has no messages or when switching between effort levels that resolve to the same underlying value
  • Fixed the Agent tool description referencing an agent list that is never delivered when running with `--bare` or with attachments disabled
  • Fixed a background worker crash in `claude agents` when accepting a stale permission prompt after a subagent was cancelled
  • Fixed `cache_creation_input_tokens` reporting as 0 in transcript and result usage when the API reports cache writes only via the nested `cache_creation` breakdown
  • Fixed the PushNotification tool incorrectly reporting "Mobile push not sent (Remote Control inactive)" in SDK-hosted sessions when Remote Control is enabled
  • Fixed sessions getting stuck after a model or login switch left stale thinking-block signatures in history; now stripped proactively with a retry safety-net
  • Thinking summaries in the collapsed group now stay readable for at least 3 seconds, render as markdown, and cap at 10 lines (`Ctrl+O` shows the full thinking)
  • In fullscreen mode, the "Thinking for Ns" indicator now counts up live while the model is thinking, and keeps its value if you interrupt mid-thought
  • Simplified the Workflow tool's inline progress display — live agent counts now show only in the persistent workflow status row below the prompt
  • The post-response timer now shows "Waiting for N background agents/workflows to finish" when backgrounded agents or workflows are still running, and reports the cumulative time once their results are processed

Raw changelog

## 2.1.152

- `/code-review --fix` now applies review findings to your working tree after the review, surfacing reuse, simplification, and efficiency suggestions; `/simplify` now invokes `/code-review --fix`
- Skills and slash commands can now set `disallowed-tools` in frontmatter to remove tools from the model while the skill is active
- Added `/reload-skills` command to re-scan skill directories without restarting the session
- `SessionStart` hooks can now return `reloadSkills: true` to re-scan skill directories, making skills installed by the hook available in the same session
- `SessionStart` hooks can now set the session title via `hookSpecificOutput.sessionTitle` on startup and resume
- Added a `MessageDisplay` hook event that lets hooks transform or hide assistant message text as it is displayed
- Added `pluginSuggestionMarketplaces` managed setting: admins can allowlist org marketplaces whose plugins may be suggested via context-aware tips
- `claude plugin marketplace remove` now accepts `--scope user|project|local` for symmetry with `marketplace add`, `install`, and `uninstall`
- Claude Code now switches to your configured `--fallback-model` for the rest of the session when the primary model is not found, instead of failing every request
- Auto mode no longer requires opt-in consent
- Vim mode: `/` in NORMAL mode now opens reverse history search (like Ctrl+R), matching bash/zsh vi-mode
- The `/usage` breakdown now includes large session files; files are scanned with a streaming read so memory usage stays flat
- Thinking summaries in the collapsed group now stay readable for at least 3 seconds, render as markdown, and cap at 10 lines (`Ctrl+O` shows the full thinking)
- In fullscreen mode, the "Thinking for Ns" indicator now counts up live while the model is thinking, and keeps its value if you interrupt mid-thought
- Simplified the Workflow tool's inline progress display — live agent counts now show only in the persistent workflow status row below the prompt
- The post-response timer now shows "Waiting for N background agents/workflows to finish" when backgrounded agents or workflows are still running, and reports the cumulative time once their results are processed
- Added the session entrypoint as an OpenTelemetry metric attribute (`app.entrypoint`, opt-in via `OTEL_METRICS_INCLUDE_ENTRYPOINT=true`)
- Fixed terminal styling degrading in very long sessions by recycling the renderer's style pool
- Fixed the sandbox-enabled warning not appearing in condensed startup mode — it now shows in every layout
- Fixed the loading spinner showing "still thinking"/"almost done thinking" while a tool is running, and reset the thinking status to "thinking" after each tool
- Fixed focus mode showing a spurious "N messages hidden" count on turns with no hidden activity
- Fixed clicking a link inside an expanded tool result collapsing the section instead of opening the link
- Fixed markdown table cell borders inheriting the color of inline code, wrapped continuation lines losing their style, and empty header cells showing a label in the narrow-terminal stacked layout
- Fixed plugin MCP servers with the same command but different environment variables being incorrectly deduplicated
- Fixed `/doctor` reporting "marketplace not found" or "plugin not found" for stale `enabledPlugins` entries referencing removed marketplaces or dropped plugins
- Fixed plugins that track a git branch silently no longer receiving updates after the plugin registry was rebuilt
- Fixed remote MCP servers failing to connect in Claude Code Remote sessions when the egress proxy is enabled
- Fixed the effort-change confirmation dialog appearing when the conversation has no messages or when switching between effort levels that resolve to the same underlying value
- Fixed the Agent tool description referencing an agent list that is never delivered when running with `--bare` or with attachments disabled
- Fixed a background worker crash in `claude agents` when accepting a stale permission prompt after a subagent was cancelled
- Fixed `cache_creation_input_tokens` reporting as 0 in transcript and result usage when the API reports cache writes only via the nested `cache_creation` breakdown
- Fixed the PushNotification tool incorrectly reporting "Mobile push not sent (Remote Control inactive)" in SDK-hosted sessions when Remote Control is enabled
- Fixed sessions getting stuck after a model or login switch left stale thinking-block signatures in history; now stripped proactively with a retry safety-net