2.1.81 untested · changelog-derived

Claude Code 2.1.81

`--bare` flag — scriptable automation in deterministic environments (CI, headless servers, backend schedulers). Skips OAuth, hooks, LSP, and plugins to run repeatable `-p` invocations with just `ANTHROPIC_API_KEY`. Agents can now run fast, stateless sub-tasks without interactive approval paths.

3 new primitives 2 workflow recipes 24 fixes

New primitives

--bareflag

Scripted `-p` calls without hooks, LSP, plugin sync, or interactive auth; requires `ANTHROPIC_API_KEY` or `apiKeyHelper`

Added `--bare` flag for scripted `-p` calls — skips hooks, LSP, plugin sync, and skill directory walks; requires `ANTHROPIC_API_KEY` or an `apiKeyHelper` via `--settings` (OAuth and keychain auth disabled); auto-memory fully disabled
--channelscapability

Permission relay for channel servers to forward tool approval prompts to your phone

Added `--channels` permission relay — channel servers that declare the permission capability can forward tool approval prompts to your phone
showClearContextOnPlanAcceptsetting

Plan mode setting to restore the "clear context" option (default hidden in 2.1.81)

Changed plan mode to hide the "clear context" option by default (restore with `"showClearContextOnPlanAccept": true`)

Workflow recipes

Orchestrated approval routing
--bare + --channels

Agents can now route work deterministically: fast, stateless sub-steps run headless (--bare without approval prompts), while sensitive operations requiring human oversight can enable --channels to surface approvals on mobile in real time. This decouples the approval path from the execution path — approval latency no longer blocks fast compute, and human judgment stays in the loop for high-stakes tool calls.

A parent workflow routes sub-agent invocations based on risk tier. Tier-1 (deterministic code analysis, local reads) spawns children with --bare, completing in seconds without approval overhead. Tier-2 (destructive mutations, API calls, external data write) re-enters interactive mode with --channels enabled, sending permission prompts to the orchestrator's phone; the agent pauses on tool calls until approved. This pattern moves headless automation from "run everything scripted" to "run safe tasks fast, keep oversight on dangerous ones."

Scripted automation without auth machinery
--bare

Backend workflows and CI agents have struggled to run Claude Code without OAuth setup, credential rotation, or interactive auth. --bare removes all auth machinery (oauth, keychain, interactive key input) and requires only ANTHROPIC_API_KEY in the environment — the minimal subset for stateless, deterministic automation.

A scheduled agent (e.g., hourly codebase linter, nightly report generator, CI step that calls Claude) spawns with claude-code -p -c "your prompt" --bare --settings '{"apiKey": "env:ANTHROPIC_API_KEY"}'. No session resume, no auto-memory, no plugin hooks — just the request and response, suitable for containerized or ephemeral compute. Backend systems can now rotate ANTHROPIC_API_KEY without touching Claude Code session state.

Agentic relevance

`--bare` unlocks deterministic, hook-free automation for sub-agents in CI/scheduler contexts. `--channels` extends approval workflows to mobile, supporting remote human oversight of tool calls. Together they enable orchestration patterns: fast deterministic tasks run `--bare`, sensitive decisions route approvals via `--channels`.

Hardening & fixes (24)

  • Fixed multiple concurrent Claude Code sessions requiring repeated re-authentication when one session refreshes its OAuth token
  • Fixed voice mode silently swallowing retry failures and showing a misleading "check your network" message instead of the actual error
  • Fixed voice mode audio not recovering when the server silently drops the WebSocket connection
  • Fixed `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` not suppressing the structured-outputs beta header, causing 400 errors on proxy gateways forwarding to Vertex/Bedrock
  • Fixed `--channels` bypass for Team/Enterprise orgs with no other managed settings configured
  • Fixed a crash on Node.js 18
  • Fixed unnecessary permission prompts for Bash commands containing dashes in strings
  • Fixed plugin hooks blocking prompt submission when the plugin directory is deleted mid-session
  • Fixed a race condition where background agent task output could hang indefinitely when the task completed between polling intervals
  • Resuming a session that was in a worktree now switches back to that worktree
  • Fixed `/btw` not including pasted text when used during an active response
  • Fixed a race where fast Cmd+Tab followed by paste could beat the clipboard copy under tmux
  • Fixed terminal tab title not updating with an auto-generated session description
  • Fixed invisible hook attachments inflating the message count in transcript mode
  • Fixed Remote Control sessions showing a generic title instead of deriving from the first prompt
  • Fixed `/rename` not syncing the title for Remote Control sessions
  • Fixed Remote Control `/exit` not reliably archiving the session
  • Improved MCP read/search tool calls to collapse into a single "Queried {server}" line (expand with Ctrl+O)
  • Improved `!` bash mode discoverability — Claude now suggests it when you need to run an interactive command
  • Improved plugin freshness — ref-tracked plugins now re-clone on every load to pick up upstream changes
  • Improved Remote Control session titles to refresh after your third message
  • Updated MCP OAuth to support Client ID Metadata Document (CIMD / SEP-991) for servers without Dynamic Client Registration
  • Disabled line-by-line response streaming on Windows (including WSL in Windows Terminal) due to rendering issues
  • [VSCode] Fixed Windows PATH inheritance for Bash tool when using Git Bash (regression in v2.1.78)

Raw changelog

## 2.1.81

- Added `--bare` flag for scripted `-p` calls — skips hooks, LSP, plugin sync, and skill directory walks; requires `ANTHROPIC_API_KEY` or an `apiKeyHelper` via `--settings` (OAuth and keychain auth disabled); auto-memory fully disabled
- Added `--channels` permission relay — channel servers that declare the permission capability can forward tool approval prompts to your phone
- Fixed multiple concurrent Claude Code sessions requiring repeated re-authentication when one session refreshes its OAuth token
- Fixed voice mode silently swallowing retry failures and showing a misleading "check your network" message instead of the actual error
- Fixed voice mode audio not recovering when the server silently drops the WebSocket connection
- Fixed `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` not suppressing the structured-outputs beta header, causing 400 errors on proxy gateways forwarding to Vertex/Bedrock
- Fixed `--channels` bypass for Team/Enterprise orgs with no other managed settings configured
- Fixed a crash on Node.js 18
- Fixed unnecessary permission prompts for Bash commands containing dashes in strings
- Fixed plugin hooks blocking prompt submission when the plugin directory is deleted mid-session
- Fixed a race condition where background agent task output could hang indefinitely when the task completed between polling intervals
- Resuming a session that was in a worktree now switches back to that worktree
- Fixed `/btw` not including pasted text when used during an active response
- Fixed a race where fast Cmd+Tab followed by paste could beat the clipboard copy under tmux
- Fixed terminal tab title not updating with an auto-generated session description
- Fixed invisible hook attachments inflating the message count in transcript mode
- Fixed Remote Control sessions showing a generic title instead of deriving from the first prompt
- Fixed `/rename` not syncing the title for Remote Control sessions
- Fixed Remote Control `/exit` not reliably archiving the session
- Improved MCP read/search tool calls to collapse into a single "Queried {server}" line (expand with Ctrl+O)
- Improved `!` bash mode discoverability — Claude now suggests it when you need to run an interactive command
- Improved plugin freshness — ref-tracked plugins now re-clone on every load to pick up upstream changes
- Improved Remote Control session titles to refresh after your third message
- Updated MCP OAuth to support Client ID Metadata Document (CIMD / SEP-991) for servers without Dynamic Client Registration
- Changed plan mode to hide the "clear context" option by default (restore with `"showClearContextOnPlanAccept": true`)
- Disabled line-by-line response streaming on Windows (including WSL in Windows Terminal) due to rendering issues
- [VSCode] Fixed Windows PATH inheritance for Bash tool when using Git Bash (regression in v2.1.78)