2.1.163 untested · changelog-derived

Claude Code 2.1.163

Version-gating for environments: managed settings `requiredMinimumVersion` and `requiredMaximumVersion` enforce Claude Code version constraints organization-wide, preventing version skew in managed teams and reducing friction from incompatible client/server state.

6 new primitives 3 workflow recipes 16 fixes

New primitives

requiredMinimumVersion / requiredMaximumVersionmanaged setting

Claude Code refuses to start if its version is outside the allowed range and directs the user to an approved version

Added `requiredMinimumVersion` and `requiredMaximumVersion` managed settings — Claude Code refuses to start if its version is outside the allowed range and directs the user to an approved version
/plugin list commandcommand

List installed plugins, with `--enabled`/`--disabled` filters

Added `/plugin list` command to list installed plugins, with `--enabled`/`--disabled` filters
"c to copy" on /btwshortcut

Copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere

Added a "c to copy" shortcut to `/btw` that copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere
hookSpecificOutput.additionalContext for Stop/SubagentStophook capability

Stop and SubagentStop hooks can return additional context to give Claude feedback and keep the turn going without being labeled a hook error

Hooks: Stop and SubagentStop hooks can now return `hookSpecificOutput.additionalContext` to give Claude feedback and keep the turn going without being labeled a hook error
\$ escape syntax in skillscommand syntax

Escape syntax to include a literal `$` before a digit in command bodies

Skills: added `\$` escape syntax to include a literal `$` before a digit in command bodies
CLAUDE_CODE_SESSION_ID for stdio MCP serversenv var / capability

stdio MCP servers now receive the same `CLAUDE_CODE_SESSION_ID` as hooks/Bash on `--resume`

stdio MCP servers now receive the same `CLAUDE_CODE_SESSION_ID` as hooks/Bash on `--resume`

Workflow recipes

Version-gated multi-agent orchestration
requiredMinimumVersion / requiredMaximumVersion + CLAUDE_CODE_SESSION_ID for stdio MCP servers

Managed version constraints prevent agent fleet incompatibility while session-ID propagation ensures coordinated MCP state across delegated agents, enabling safe version-locked orchestration in production.

Set requiredMinimumVersion: "2.1.163" org-wide to lock a team of agents to a known-stable release. Background agents spawned via claude agents receive consistent CLAUDE_CODE_SESSION_ID through MCP servers, allowing central logging, session tracking, and audit. If an agent's local Claude Code falls behind, it refuses to start and directs upgrade, preventing silently divergent behavior.

Hook-driven feedback loops in delegated stops
hookSpecificOutput.additionalContext for Stop/SubagentStop + hook if: pattern fixes

Stop hooks can now return feedback to Claude without aborting the turn, enabling graceful downstream coordination when a delegated subagent or background task finishes—turn keeps going, hook provides context, no false errors.

A Stop hook detects a subagent completion and returns additionalContext summarizing the delegate's result. Claude reads this feedback in-turn without error noise, updates the parent task graph, and decides next action. Hook if: conditions now correctly match dollar-variables in subshells, preventing accidental fires on every $() command. This tightens the feedback path in orchestrated workflows where external signals need to flow back to Claude mid-turn.

Clipboard-enhanced interactive agent annotation
"c to copy" shortcut on /btw + /plugin list visibility

Agents can now invoke /btw to cite sources and annotations, then copy them verbatim to clipboard for manual review or downstream tool integration, reducing friction in human-in-the-loop and hybrid-annotation workflows.

An agent writes analysis via /btw, then presses 'c' to copy the markdown with all formatting intact. Human pastes into a document or code block. Later, /plugin list --enabled shows the agent which capabilities are available, allowing self-aware fallback if a required plugin is disabled. Useful in audit trails, decision docs, and handoff scenarios where preserving markdown structure matters.

Agentic relevance

Version gating and session-ID propagation to MCP servers strengthen infrastructure for multi-agent orchestration and managed environments. The new hook feedback capability (additionalContext) enables smarter Stop/SubagentStop handling without false errors, supporting tighter feedback loops in delegated workflows. The `/plugin list` command and clipboard shortcut improve agent visibility and interactive capability, though the release is primarily a hardening pass for stability and Windows/Bedrock support.

Hardening & fixes (16)

  • Fixed `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
  • Fixed `claude -p` failing with "ANTHROPIC_API_KEY required" on Bedrock/Vertex/Foundry when `CI=true` and no Anthropic API key is set
  • Fixed bash commands failing under bazel and EDR-protected Go workflows: `$TMPDIR` was overridden to `/tmp/claude-{uid}` for all commands instead of only sandboxed ones (regression in 2.1.154)
  • Fixed 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 org-managed permission rules not applying for the entire session when the managed settings fetch completed during startup on a fresh config directory
  • Fixed 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 keyboard input becoming permanently unresponsive after a paste operation whose end marker is dropped by the terminal
  • Fixed hook `if: "Bash(...)"` conditions firing on every Bash command containing `$()` or `$VAR`; the pattern now matches against commands inside subshells and backticks too
  • Fixed deny rules on home-directory paths (e.g. `Read(~/Desktop/**)`) not blocking Bash commands that reference the path via `$HOME`
  • Fixed a stray "(no content)" line left in the transcript after closing panel dialogs like /mcp and /plugins
  • 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
  • Clearer descriptions for built-in commands and skills in the / menu
  • The subscription-switch suggestion now shows in the startup announcement slot instead of a toast
  • `claude agents` dispatching from the state-grouped view now starts the session in the directory the agent view was opened from

Raw changelog

## 2.1.163

- Added `requiredMinimumVersion` and `requiredMaximumVersion` managed settings — Claude Code refuses to start if its version is outside the allowed range and directs the user to an approved version
- Added `/plugin list` command to list installed plugins, with `--enabled`/`--disabled` filters
- Added a "c to copy" shortcut to `/btw` that copies the raw markdown answer to the clipboard, preserving formatting when pasted elsewhere
- Hooks: Stop and SubagentStop hooks can now return `hookSpecificOutput.additionalContext` to give Claude feedback and keep the turn going without being labeled a hook error
- Skills: added `\$` escape syntax to include a literal `$` before a digit in command bodies
- stdio MCP servers now receive the same `CLAUDE_CODE_SESSION_ID` as hooks/Bash on `--resume`
- Fixed `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
- Fixed `claude -p` failing with "ANTHROPIC_API_KEY required" on Bedrock/Vertex/Foundry when `CI=true` and no Anthropic API key is set
- Fixed bash commands failing under bazel and EDR-protected Go workflows: `$TMPDIR` was overridden to `/tmp/claude-{uid}` for all commands instead of only sandboxed ones (regression in 2.1.154)
- Fixed 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 org-managed permission rules not applying for the entire session when the managed settings fetch completed during startup on a fresh config directory
- Fixed 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 keyboard input becoming permanently unresponsive after a paste operation whose end marker is dropped by the terminal
- Fixed hook `if: "Bash(...)"` conditions firing on every Bash command containing `$()` or `$VAR`; the pattern now matches against commands inside subshells and backticks too
- Fixed deny rules on home-directory paths (e.g. `Read(~/Desktop/**)`) not blocking Bash commands that reference the path via `$HOME`
- Fixed a stray "(no content)" line left in the transcript after closing panel dialogs like /mcp and /plugins
- 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
- Clearer descriptions for built-in commands and skills in the / menu
- The subscription-switch suggestion now shows in the startup announcement slot instead of a toast
- `claude agents` dispatching from the state-grouped view now starts the session in the directory the agent view was opened from