claudekit / updates / claude-code-2-1-163
[ PATCH · ]

Claude Code 2.1.163

Claude Code 2.1.163 lands enterprise version pinning, plugin listing, and several agent-loop ergonomics. `requiredMinimumVersion` and `requiredMaximumVersion` managed settings refuse to start outside an approved range, `/plugin list` lists installed plugins with `--enabled`/`--disabled` filters, and Stop and SubagentStop hooks can return `hookSpecificOutput.additionalContext` to keep the turn going. stdio MCP servers now receive `CLAUDE_CODE_SESSION_ID` on `--resume`. The release also fixes `claude -p` hanging on backgrounded commands, a `$TMPDIR` override regression from 2.1.154, org-managed permission rules missing parts of startup, and a broad sweep of background-session, Windows, and terminal-UI bugs.

Official announcement →

This article is a summary based on official documentation.

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

  • requiredMinimumVersion and requiredMaximumVersion managed settings

    Organizations 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 list command with status filters

    Listing installed plugins and their enabled status meant digging through directories. /plugin list now lists installed plugins, with --enabled and --disabled filters.

  • /btw “c to copy” shortcut

    Copying a /btw answer for use elsewhere could mangle formatting. Press c on the /btw view to copy the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere.

  • additionalContext feedback from Stop and SubagentStop hooks

    Stop and SubagentStop hooks providing extra feedback were treated as hook errors, breaking the turn flow. Both hooks can now return hookSpecificOutput.additionalContext to give Claude feedback and keep the turn going without being labeled a hook error.

  • Skills: \$ escape syntax

    Including 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_ID on --resume

    Hooks and Bash received CLAUDE_CODE_SESSION_ID on --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 agents dispatching 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 -p hanging forever after its final result when a backgrounded command never exits — background shells are now stopped ~5s after the result once stdin closes.
  • claude -p failing with “ANTHROPIC_API_KEY required” on Bedrock/Vertex/Foundry when CI=true and no Anthropic API key is set — fixed.
  • $TMPDIR overridden 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 agents losing 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 /mcp and /plugins — fixed.

Notes

  • Enterprise version pinning — set requiredMinimumVersion and requiredMaximumVersion in managed settings to refuse Claude Code launches outside an approved range. Users get a clear pointer to an approved version.
  • $TMPDIR regression 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.additionalContext keeps the turn going with feedback instead of being labeled a hook error, enabling agent-loop patterns that inject context at end-of-turn.