What changed
Claude Code 2.1.163 shipped on June 4, 2026. The release leans on enterprise-operations features: admins can pin an allowed version range via managed settings, /plugin list exposes installed plugins by status, and Stop and SubagentStop hooks can hand feedback back to Claude without being labeled a hook error. The fix list addresses operationally significant regressions — claude -p hanging on backgrounded commands, the $TMPDIR override from 2.1.154 that broke bazel and EDR-protected Go workflows, org-managed permission rules missing parts of startup — and background sessions now update Claude Code in the background so opening a session after an update no longer waits on a cold restart.
New features
-
requiredMinimumVersionandrequiredMaximumVersionmanaged settingsOrganizations had no way to refuse unapproved Claude Code versions. Claude Code now refuses to start if its version is outside the range set in managed settings, and directs the user to an approved version.
-
/plugin listcommand with status filtersListing installed plugins and their enabled status meant digging through directories.
/plugin listnow lists installed plugins, with--enabledand--disabledfilters. -
/btw“c to copy” shortcutCopying a
/btwanswer for use elsewhere could mangle formatting. Presscon the/btwview to copy the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere. -
additionalContextfeedback from Stop and SubagentStop hooksStop and SubagentStop hooks providing extra feedback were treated as hook errors, breaking the turn flow. Both hooks can now return
hookSpecificOutput.additionalContextto give Claude feedback and keep the turn going without being labeled a hook error. -
Skills:
\$escape syntaxIncluding a literal
$before a digit in a skill command body conflicted with substitution rules. A new\$escape syntax includes a literal$before a digit in command bodies. -
stdio MCP servers receive
CLAUDE_CODE_SESSION_IDon--resumeHooks and Bash received
CLAUDE_CODE_SESSION_IDon--resume, but stdio MCP servers did not. They now receive the same session ID for consistent session-aware behavior.
Key improvements
-
Background sessions update Claude Code in the background
Opening a background session after a Claude Code update waited on a cold restart. Background agent sessions now update to a new Claude Code version in the background, so opening a session after an update no longer waits on a cold restart.
-
Dispatch from the state-grouped agent view starts in the correct directory
claude agentsdispatching from the state-grouped view sometimes started sessions in an unexpected directory. Dispatch from that view now starts the session in the directory the agent view was opened from. -
Clearer descriptions for built-in commands and skills
Descriptions for built-in commands and skills in the
/menu were terse and sometimes unclear. They were rewritten for clarity. -
Subscription-switch suggestion moved to the startup announcement slot
The subscription-switch suggestion appeared as a toast that scrolled away. It now shows in the startup announcement slot instead, so it persists at the next launch.
Bug fixes
CLI & environment
claude -phanging forever after its final result when a backgrounded command never exits — background shells are now stopped ~5s after the result once stdin closes.claude -pfailing with “ANTHROPIC_API_KEY required” on Bedrock/Vertex/Foundry whenCI=trueand no Anthropic API key is set — fixed.$TMPDIRoverridden to/tmp/claude-{uid}for all commands instead of only sandboxed ones, breaking bash under bazel and EDR-protected Go workflows (regression in 2.1.154) — restricted to sandboxed commands again.
Permissions & managed settings
- Org-managed permission rules not applying for the entire session when the managed settings fetch completed during startup on a fresh config directory — fixed.
- Hook
if: "Bash(...)"conditions firing on every Bash command containing$()or$VAR— the pattern now matches against commands inside subshells and backticks too. - Deny rules on home-directory paths (e.g.
Read(~/Desktop/**)) not blocking Bash commands that reference the path via$HOME— fixed.
Windows
- Bash commands failing on Windows with “EEXIST: file already exists” on the session-env directory when it has the read-only attribute or is inside OneDrive — fixed.
Sessions & background agents
- Background sessions in
claude agentslosing their running background tasks when reattached after a Claude Code update — fixed. - Terminal misalignment and a multi-second hang when exiting the agent view by pressing Esc — fixed.
- Clicking Stop on a background-task chip in the desktop app not clearing the chip when the underlying process was already gone — fixed.
Terminal & UI
- Keyboard input becoming permanently unresponsive after a paste operation whose end marker is dropped by the terminal — fixed.
- A stray “(no content)” line left in the transcript after closing panel dialogs like
/mcpand/plugins— fixed.
Notes
- Enterprise version pinning — set
requiredMinimumVersionandrequiredMaximumVersionin managed settings to refuse Claude Code launches outside an approved range. Users get a clear pointer to an approved version. $TMPDIRregression resolved — the 2.1.154 change that applied/tmp/claude-{uid}to every command is now scoped back to sandboxed commands only. Environments that hit bash failures under bazel or EDR tools should recover with no settings change.- Managed permission rules startup-timing fix — even when the managed settings fetch completes during startup on a fresh config directory, the rules apply to the whole session. Anyone who previously saw partial enforcement should re-verify after upgrading.
- Broader hook
if: "Bash(...)"matching — patterns now match inside subshells and backticks, so previously narrow conditions may fire more often. Re-check any automation that triggers more than expected. - New use for Stop/SubagentStop hooks — returning
hookSpecificOutput.additionalContextkeeps the turn going with feedback instead of being labeled a hook error, enabling agent-loop patterns that inject context at end-of-turn.