Claude Code 2.1.140

💡

Agent tool `subagent_type` matching now accepts case- and separator-insensitive values (e.g. "Code Reviewer" resolves to `code-reviewer`), and plugins now warn when a default component folder (e.g. `commands/`) is silently ignored because `plugin.json` sets the matching key. Bug fixes cover `/goal` silently hanging under `disableAllHooks` / `allowManagedHooksOnly`, a settings hot-reload regression on symlinked files, `claude --bg` connection drops at idle-exit, remote managed settings not retrying on 401, the managed `extraKnownMarketplaces` auto-update policy not being persisted, `Read` tool validation on whitespace-padded `offset` strings, and a Windows event-loop stall caused by missing executables.

🔗 Official announcement →

This article is a summary based on official documentation.

What changed

Claude Code 2.1.140 shipped on May 12, 2026. No new commands this release — the headline changes are quality-of-life: Agent tool subagent_type matching is now case- and separator-insensitive (so "Code Reviewer" resolves to code-reviewer), the agent color palette has been refreshed, and plugins now surface a warning when a default component folder (e.g. commands/) is silently ignored because plugin.json sets the matching key. The rest of the release is bug fixes — /goal no longer silently hangs when disableAllHooks / allowManagedHooksOnly is set, settings hot-reload no longer misattributes events on symlinked files, claude --bg no longer drops with “connection dropped mid-request” at idle-exit, remote managed settings now retry once on 401 with a force-refreshed token, the managed extraKnownMarketplaces auto-update policy is now persisted to known_marketplaces.json, /loop stops scheduling redundant wakeups, a Windows event-loop stall caused by missing executables triggering synchronous where.exe re-spawns is gone, Read tool calls accept whitespace-padded or +-prefixed offset strings, and the native terminal cursor stays at the input caret when the terminal loses focus.

Improvements

  • Agent tool subagent_type — case- and separator-insensitive matching

    Calling a subagent required matching the registered name exactly (kebab-case as written), so natural-looking values like "Code Reviewer" failed to resolve. Matching is now case- and separator-insensitive, so e.g. "Code Reviewer" resolves to code-reviewer.

  • Updated agent color palette

    Multiple subagents in flight could end up with hard-to-distinguish colors. The agent color palette has been updated to reduce visual collisions.

  • Plugins warn when a default component folder is silently ignored

    When plugin.json sets a key like commands, the same-named default folder (commands/) is silently ignored, leaving authors guessing why their components didn’t load. Plugins now warn in /doctor, claude plugin list, and /plugin when this happens.

Bug fixes

/goal & automation

  • /goal silently hanging when disableAllHooks or allowManagedHooksOnly is set — instead of a spinner that never resolves, it now shows a clear message.
  • /loop scheduling redundant wakeups to poll for background tasks that already notify on completion — fixed.

Settings & auth

  • Regression in settings hot-reload where symlinked settings files caused misattributed change events and spurious ConfigChange hooks — fixed.
  • Remote managed settings not retrying on 401 — now retries once with a force-refreshed token.
  • Managed extraKnownMarketplaces auto-update policy not being persisted to known_marketplaces.json — fixed.

Background service

  • claude --bg failing with “connection dropped mid-request” when the background service was about to idle-exit — fixed.
  • Background service startup failing on machines with enterprise endpoint security — fixed by allowing more time during startup.

Tools & platform

  • Read tool calls failing validation when offset is passed as a whitespace-padded or +-prefixed string — fixed.
  • Recurring event-loop stall on Windows when a missing executable (e.g. gh) triggered synchronous where.exe re-spawns on every check — fixed.

UI & terminal

  • Native terminal cursor not staying at the input caret when the terminal loses focus — fixed.

Notes

  • Lenient subagent_type matching"Code Reviewer", "code_reviewer", and "code-reviewer" all resolve to the same agent. Existing automation that called subagents by their exact slug keeps working; you just have more flexibility in how those names are written.
  • Missing plugin components — if a plugin.json sets a key like commands, the same-named default folder is ignored. If components seem missing, check the warnings in /doctor, claude plugin list, and /plugin first.
  • /goal under hook policies — under disableAllHooks / allowManagedHooksOnly, /goal no longer hangs on a stuck spinner; it surfaces a clear message instead, which makes policy-conflict debugging faster.
  • Remote managed settings 401 retry — there’s now one retry with a force-refreshed token, but environments with chronically expiring credentials will still need a re-login eventually. Don’t ignore repeated 401s.
  • Background service startup time — the fix for enterprise endpoint security gives the service more time to start, so a brief delay on first launch is expected behavior.