2.1.97 untested · changelog-derived

Claude Code 2.1.97

Focus view toggle in NO_FLICKER mode (`Ctrl+O`) — compact display of prompt, tool summaries with edit diffs, and final response. Reduces context switching for agents monitoring active work without full session visibility.

6 new primitives 3 workflow recipes 39 fixes

New primitives

Ctrl+O focus toggleKeybinding

Toggles focus view in NO_FLICKER mode showing prompt, one-line tool summary with edit diffstats, and final response

Added focus view toggle (`Ctrl+O`) in `NO_FLICKER` mode showing prompt, one-line tool summary with edit diffstats, and final response
refreshIntervalSetting

Re-runs the status line command every N seconds

Added `refreshInterval` status line setting to re-run the status line command every N seconds
workspace.git_worktreeStatus line JSON field

Populated in status line JSON input when current directory is inside a linked git worktree

Added `workspace.git_worktree` to the status line JSON input, set when the current directory is inside a linked git worktree
● N running indicatorUI indicator

Shows count of live subagent instances in `/agents` next to agent types

Added `● N running` indicator in `/agents` next to agent types with live subagent instances
Cedar syntax highlightingCapability

Syntax highlighting for Cedar policy files (`.cedar`, `.cedarpolicy` extensions)

Added syntax highlighting for Cedar policy files (`.cedar`, `.cedarpolicy`)
CJK sentence punctuation completionCapability

Slash command and `@`-mention completion triggers after CJK sentence punctuation without requiring space

Improved slash command and `@`-mention completion to trigger after CJK sentence punctuation, so Japanese/Chinese input no longer requires a space before `/` or `@`

Workflow recipes

Compact Session Monitoring for Long Agent Runs
Ctrl+O focus view toggle + refreshInterval status line setting + ● N running indicator

Multi-stage orchestrations (parent spawning subagents, chained delegations) need lightweight session inspection without burning context. The focus view collapses prompt/tool/response into one viewport; refreshable status line enables polling without re-reading; live agent count indicator surfaces orchestration depth at a glance.

Agent oversight surfaces: parent session opens child subagent in split mode, displays focus view (Ctrl+O) with refreshInterval: 5 (5s poll). Status line shows running subagents via ● N running indicator; parent agent can scan tool summaries and edit diffs without expanding full response text. On long runs (30+ min), focus view reduces context thrash from repeated reads while maintaining decision velocity.

Worktree-Isolated Subagent Orchestration with Transparency
workspace.git_worktree status line field + subagent worktree isolation fix + /agents live indicator

Sparse worktrees isolate subagent filesystem mutations but previously leaked working directory back to parent, risking silent contamination. The 2.1.97 fix + workspace.git_worktree JSON field enable parent to verify isolation state in real time and route work accordingly.

Orchestration rig: parent checks workspace.git_worktree in status JSON before spawning isolated subagent; if set, parent knows it's inside a worktree and can log it for transparency. On subagent return, parent re-checks workspace.git_worktree; if it's now unset, isolation held. Failing that, parent can surface "WARNING: worktree isolation leaked" and defer mutation. Layered with the 2.1.97 fix, this prevents parent/child cwd confusion in repos with deep branching patterns.

Cedar Policy Authoring with Live Syntax Feedback
Cedar syntax highlighting + CJK sentence punctuation completion

Cedar (AWS IAM policy language) is domain-specific; full highlighting is new in 2.1.97. CJK punctuation support removes friction for multi-language policy teams. Together, they enable fluent authoring without space-padding syntax completion.

Agent writes Cedar policies in-repo: new .cedar files trigger syntax highlighting immediately. Agents (or human co-authors with CJK keyboards) compose policies without fighting space-before-/ requirements; completion triggers on 、 (ideographic comma), 。 (ideographic period), or ! (full-width exclamation), speeding up policy synthesis in multilingual orgs. Pairs well with structured validation checks.

Agentic relevance

The focus view toggle (`Ctrl+O`) and refreshable status line (`refreshInterval`) enable agents to monitor long-running sessions compactly without full context overhead. The `workspace.git_worktree` field and subagent live-instance indicator support orchestration and multi-agent workflows. Cedar syntax highlighting and CJK input completion expand language/policy domain coverage. Most changes are hardening-focused: permission fixes prevent silent failures in Accept Edits mode, MCP/OAuth robustness prevents credential/buffer leaks, and transcript persistence fixes ensure agent continuity on resume.

Hardening & fixes (39)

  • Fixed `--dangerously-skip-permissions` flag being silently downgraded to accept-edits mode after approving writes to protected paths
  • Fixed and hardened Bash tool permissions with tighter checks around env-var prefixes, network redirects, and reduced false prompts on common commands
  • Fixed permission rules with names matching JavaScript prototype properties (e.g. `toString`) causing `settings.json` to be silently ignored
  • Fixed managed-settings allow rules remaining active after removal until process restart
  • Fixed `permissions.additionalDirectories` changes not applying mid-session
  • Fixed `--add-dir` conflicts with `settings.permissions.additionalDirectories` removals
  • Fixed MCP HTTP/SSE connections accumulating ~50 MB/hr of unreleased buffers on server reconnect
  • Fixed MCP OAuth `oauth.authServerMetadataUrl` not honored on token refresh after restart (ADFS compatibility)
  • Fixed 429 retries burning all attempts in 13 seconds; exponential backoff now enforced as minimum
  • Fixed rate-limit upgrade options disappearing after context compaction
  • Fixed multiple `/resume` picker issues: uneditable `--resume <name>`, Ctrl+A wiping search, empty list navigation, stale cross-project state, and 10KB file-edit diff loss
  • Fixed `--resume` cache misses and lost mid-turn input from attachment messages
  • Fixed messages typed while Claude works not persisted to transcript
  • Fixed `Stop`/`SubagentStop` hook failures on long sessions and API error messaging
  • Fixed subagents with worktree isolation or `cwd:` override leaking working directory to parent Bash tool
  • Fixed duplicate multi-MB subagent transcript files on prompt-too-long retries
  • Fixed `claude plugin update` false "already at latest" messages for git-based marketplace plugins
  • Fixed slash command picker breaking on YAML boolean keyword plugin names
  • Fixed wrapped URL copying in NO_FLICKER mode inserting spaces at line breaks
  • Fixed scroll rendering artifacts in NO_FLICKER with zellij
  • Fixed NO_FLICKER crash on MCP tool result hover
  • Fixed NO_FLICKER memory leak from API retries
  • Fixed slow mouse-wheel scrolling in NO_FLICKER on Windows Terminal
  • Fixed custom status line not displaying in NO_FLICKER on terminals shorter than 24 rows
  • Fixed Shift+Enter and Alt/Cmd+arrow shortcuts in Warp with NO_FLICKER
  • Fixed Korean/Japanese/Unicode text garbling on copy in no-flicker mode on Windows
  • Fixed Bedrock SigV4 authentication with empty string `AWS_BEARER_TOKEN_BEDROCK` or `ANTHROPIC_BEDROCK_BASE_URL` (GitHub Actions compatibility)
  • Improved Accept Edits mode auto-approval for safe env var/wrapper-prefixed filesystem commands
  • Improved auto and bypass-permissions modes to auto-approve sandbox network access
  • Improved sandbox `sandbox.network.allowMachLookup` on macOS
  • Improved image handling: pasted and attached images compressed to Read tool budget
  • Improved Bridge sessions to show local git repo, branch, and working directory on session card
  • Improved footer layout: Focus and notification indicators stay on mode-indicator row
  • Improved context-low warning as transient footer notification
  • Improved markdown blockquotes with continuous left bar across wrapped lines
  • Improved session transcript size by skipping empty hook entries
  • Improved transcript accuracy with final token usage per block
  • Improved Bash tool OTEL tracing with W3C `TRACEPARENT` env var inheritance to subprocesses
  • Updated `/claude-api` skill to cover Managed Agents alongside Claude API

Raw changelog

## 2.1.97

- Added focus view toggle (`Ctrl+O`) in `NO_FLICKER` mode showing prompt, one-line tool summary with edit diffstats, and final response
- Added `refreshInterval` status line setting to re-run the status line command every N seconds
- Added `workspace.git_worktree` to the status line JSON input, set when the current directory is inside a linked git worktree
- Added `● N running` indicator in `/agents` next to agent types with live subagent instances
- Added syntax highlighting for Cedar policy files (`.cedar`, `.cedarpolicy`)
- Fixed `--dangerously-skip-permissions` being silently downgraded to accept-edits mode after approving a write to a protected path
- Fixed and hardened Bash tool permissions, tightening checks around env-var prefixes and network redirects, and reducing false prompts on common commands
- Fixed permission rules with names matching JavaScript prototype properties (e.g. `toString`) causing `settings.json` to be silently ignored
- Fixed managed-settings allow rules remaining active after an admin removed them until process restart
- Fixed `permissions.additionalDirectories` changes in settings not applying mid-session
- Fixed removing a directory from `settings.permissions.additionalDirectories` revoking access to the same directory passed via `--add-dir`
- Fixed MCP HTTP/SSE connections accumulating ~50 MB/hr of unreleased buffers when servers reconnect
- Fixed MCP OAuth `oauth.authServerMetadataUrl` not being honored on token refresh after restart, fixing ADFS and similar IdPs
- Fixed 429 retries burning all attempts in ~13 seconds when the server returns a small `Retry-After` — exponential backoff now applies as a minimum
- Fixed rate-limit upgrade options disappearing after context compaction
- Fixed several `/resume` picker issues: `--resume <name>` opening uneditable, Ctrl+A reload wiping search, empty list swallowing navigation, task-status text replacing conversation summary, and cross-project staleness
- Fixed file-edit diffs disappearing on `--resume` when the edited file was larger than 10KB
- Fixed `--resume` cache misses and lost mid-turn input from attachment messages not being saved to the transcript
- Fixed messages typed while Claude is working not being persisted to the transcript
- Fixed prompt-type `Stop`/`SubagentStop` hooks failing on long sessions, and hook evaluator API errors displaying "JSON validation failed" instead of the actual message
- Fixed subagents with worktree isolation or `cwd:` override leaking their working directory back to the parent session's Bash tool
- Fixed compaction writing duplicate multi-MB subagent transcript files on prompt-too-long retries
- Fixed `claude plugin update` reporting "already at the latest version" for git-based marketplace plugins when the remote had newer commits
- Fixed slash command picker breaking when a plugin's frontmatter `name` is a YAML boolean keyword
- Fixed copying wrapped URLs in `NO_FLICKER` mode inserting spaces at line breaks
- Fixed scroll rendering artifacts in `NO_FLICKER` mode when running inside zellij
- Fixed a crash in `NO_FLICKER` mode when hovering over MCP tool results
- Fixed a `NO_FLICKER` mode memory leak where API retries left stale streaming state
- Fixed slow mouse-wheel scrolling in `NO_FLICKER` mode on Windows Terminal
- Fixed custom status line not displaying in `NO_FLICKER` mode on terminals shorter than 24 rows
- Fixed Shift+Enter and Alt/Cmd+arrow shortcuts not working in Warp with `NO_FLICKER` mode
- Fixed Korean/Japanese/Unicode text becoming garbled when copied in no-flicker mode on Windows
- Fixed Bedrock SigV4 authentication failing when `AWS_BEARER_TOKEN_BEDROCK` or `ANTHROPIC_BEDROCK_BASE_URL` are set to empty strings (as GitHub Actions does for unset inputs)
- Improved Accept Edits mode to auto-approve filesystem commands prefixed with safe env vars or process wrappers (e.g. `LANG=C rm foo`, `timeout 5 mkdir out`)
- Improved auto mode and bypass-permissions mode to auto-approve sandbox network access prompts
- Improved sandbox: `sandbox.network.allowMachLookup` now takes effect on macOS
- Improved image handling: pasted and attached images are now compressed to the same token budget as images read via the Read tool
- Improved slash command and `@`-mention completion to trigger after CJK sentence punctuation, so Japanese/Chinese input no longer requires a space before `/` or `@`
- Improved Bridge sessions to show the local git repo, branch, and working directory on the claude.ai session card
- Improved footer layout: indicators (Focus, notifications) now stay on the mode-indicator row instead of wrapping below
- Improved context-low warning to show as a transient footer notification instead of a persistent row
- Improved markdown blockquotes to show a continuous left bar across wrapped lines
- Improved session transcript size by skipping empty hook entries and capping stored pre-edit file copies
- Improved transcript accuracy: per-block entries now carry the final token usage instead of the streaming placeholder
- Improved Bash tool OTEL tracing: subprocesses now inherit a W3C `TRACEPARENT` env var when tracing is enabled
- Updated `/claude-api` skill to cover Managed Agents alongside the Claude API