Claude Code 2.1.140: Agent Matching, Background Service Fixes
Claude Code 2.1.140 brings case-insensitive agent matching, fixes for background service startup on enterprise networks, and resolves symlinked settings file detection issues.
TL;DR
- Agent tool `subagent_type` now accepts case- and separator-insensitive values
- Fixed `/goal` hanging silently when hooks are disabled
- Resolved background service startup and idle-exit issues on Windows and enterprise networks
- Fixed symlinked settings file change detection and remote token refresh logic
New
- Case-insensitive agent matching — `subagent_type` now resolves values like `"Code Reviewer"` to `code-reviewer` regardless of casing or separators
- Agent color palette update — visual refresh to the agent UI
- Plugin folder warnings — plugins now warn when default component folders (e.g. `commands/`) are silently ignored due to `plugin.json` configuration, visible in `/doctor`, `claude plugin list`, and `/plugin`
Fixed
- `/goal` silent hang — now shows a clear message instead of an unresolved indicator when `disableAllHooks` or `allowManagedHooksOnly` is set
- Settings hot-reload regression — symlinked settings files no longer cause misattributed change events and spurious `ConfigChange` hooks
- `claude --bg` connection drops — fixed "connection dropped mid-request" errors when the background service was about to idle-exit
- Background service startup on enterprise networks — increased timeout to prevent failures on machines with endpoint security software
- Remote managed settings 401 retry — now retries once with a force-refreshed token instead of failing silently
- Managed `extraKnownMarketplaces` persistence — auto-update policy now correctly persists to `known_marketplaces.json`
- `/loop` redundant wakeups — eliminated unnecessary polling for background tasks that already notify on completion
- Windows event-loop stall — fixed recurring stalls caused by missing executables (e.g. `gh`) triggering synchronous `where.exe` re-spawns on every check
- `Read` tool validation — fixed failures when `offset` is passed as whitespace-padded or `+`-prefixed strings
- Terminal cursor focus — native terminal cursor now stays at the input caret when the terminal loses focus
Update: npm install -g @anthropic-ai/claude-code@2.1.140 or visit the Claude Code changelog.
Source: Claude Code