Claude Code 2.1.140 fixes /goal hangs and adds case-insensitive subagent matching
Anthropic shipped Claude Code 2.1.140 with a /goal fix for hook-restricted sessions, case-insensitive subagent matching, and prompt/token reductions. The update should reduce failures in managed settings and background runs.

TL;DR
- Claude Code 2.1.140 shipped 13 CLI changes, led by a fix that stops
/goalfrom hanging in sessions withdisableAllHooksorallowManagedHooksOnly, according to ClaudeCodeLog's release post and ClaudeCodeLog's changelog thread. - The agent tool now accepts case- and separator-insensitive
subagent_typevalues, so names likeCode Reviewerresolve tocode-reviewer, per ClaudeCodeLog's release post. - Several operational fixes landed in the same build:
claude --bgno longer drops mid-request during idle exit, Windows avoids a recurringwhere.exestall, and remote managed settings now retry once after a 401, according to ClaudeCodeLog's changelog thread. - The release also trims prompt overhead: ClaudeCodeLog's additional changes post says prompt files fell by 25 and prompt tokens fell by 20,752, while the linked v2.1.140 release page and prompt stats diff put numbers on the shift.
You can jump straight to the release tag, inspect the CLI surface diff, and compare the prompt stats diff. bridgemindai's /goal screenshot shows the command only appeared one version earlier, and badlogicgames' comparison post immediately framed it against Shopify's AutoResearch.
/goal
Claude Code had only just exposed /goal in 2.1.139. bridgemindai's screenshot described it as a native "keep working until the condition is met" loop, and yacineMTB's example prompt showed the obvious abuse case: let it keep optimizing code until a wall-clock condition is met.
2.1.140 is mostly the cleanup release for that ship. According to ClaudeCodeLog's changelog thread, sessions running with disableAllHooks or allowManagedHooksOnly no longer sit on an unresolved spinner, they now surface a clear message instead.
That bug was not theoretical. jeffscottward's failure report showed users already hitting long-running tool failures around /goal, while TheRealAdamG's evals post captured the next question fast: whether these open-ended goal modes need their own evals.
Subagent matching
The cleanest quality-of-life fix in the build is the agent tool's looser subagent_type matching. Per ClaudeCodeLog's changelog thread, the CLI now accepts case- and separator-insensitive values, so human-ish inputs like Code Reviewer map to code-reviewer instead of failing tool selection.
That is a tiny parser change with outsized leverage. It removes one of the dumbest failure modes in multi-agent workflows, where the agent knows the right role name but misses the exact slug format.
Background and managed settings
Most of 2.1.140 is infrastructure janitor work. The changelog groups the main fixes into session durability, managed-config correctness, and platform-specific stalls:
claude --bgno longer fails with "connection dropped mid-request" when the background service is about to idle-exit.- Background service startup waits longer on machines with enterprise endpoint security.
- Remote managed settings retry once on 401 with a force-refreshed token.
- Symlinked settings files no longer trigger misattributed hot-reload events and spurious
ConfigChangehooks. - Windows avoids a recurring event-loop stall caused by repeated synchronous
where.exechecks when an executable likeghis missing. /loopstops scheduling redundant wakeups for tasks that already notify on completion.- Read tool calls now accept whitespace-padded or
+-prefixed string offsets.
Those fixes say more about where Claude Code is getting used than the headline features do. Enterprise endpoint security, remote managed settings, symlinked configs, and background services are all operator problems, not toy-terminal problems.
Prompt footprint
The linked metadata for 2.1.140 shows a small bundle increase, up 48.4 kB, but a much larger prompt cleanup. According to ClaudeCodeLog's additional changes post, prompt files fell 37.9 percent and prompt tokens fell 31.3 percent in a single day-over-day release.
The token mix also shifted toward tool instructions. The same post says tool tokens rose from 36.0 percent to 43.5 percent, while system tokens dropped from 29.0 percent to 22.3 percent and skill tokens rose from 2.8 percent to 4.0 percent.
Two string-level edits are especially revealing. The linked grep tool description diff now explicitly says grep is ripgrep-based and should always be used for search tasks, while the write tool description diff clarifies that write operates on the local filesystem. The CLI surface diff also adds CLAUDE_CODE_RESUME_PROMPT and CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE, and removes CLAUDE_CODE_AGENT_COST_STEER.