Claude Code 2.1.89: Deferred Hooks, Flicker-Free Rendering

Deferred permission hooks, flicker-free rendering, and 50+ fixes including StructuredOutput schema cache bug, Windows CRLF issues, and LSP zombie states.

Claude Code 2.1.89: Deferred Hooks, Flicker-Free Rendering

TL;DR

  • Deferred permission decisions let headless sessions pause at tool calls and resume with hook re-evaluation
  • Flicker-free alt-screen rendering and MCP connection optimizations for faster startup
  • Major fixes: StructuredOutput schema cache bug (50% failure rate), memory leaks, Windows CRLF doubling, LSP zombie states

New

  • Deferred permission decisions in PreToolUse hooks — headless sessions can now pause at a tool call and resume with -p --resume to have the hook re-evaluate, enabling async approval workflows
  • Flicker-free rendering — set CLAUDE_CODE_NO_FLICKER=1 to opt into alt-screen rendering with virtualized scrollback
  • PermissionDenied hook — fires after auto mode classifier denials; return {retry: true} to let the model retry the command
  • Named subagents in @-mention typeahead — easier discovery and selection of subagents
  • MCP connection optimizationsMCP_CONNECTION_NONBLOCKING=true skips the MCP connection wait entirely, and server connections are now bounded at 5s instead of blocking on the slowest server
  • Auto mode denied commands in /permissions — denied commands now show a notification and appear in /permissions → Recent tab where you can retry with r

Fixed

  • StructuredOutput schema cache bug — was causing ~50% failure rate when using multiple schemas
  • Memory leak in long-running sessions — large JSON inputs were retained as LRU cache keys
  • Windows CRLF doubling and Markdown hard line breaks — Edit/Write tools were doubling CRLF and stripping two trailing spaces
  • LSP server zombie state — server now restarts on next request instead of failing until session restart
  • Voice push-to-talk on modifier combos — some key bindings weren't activating; voice mode on Windows failing with "WebSocket upgrade rejected with HTTP 101"
  • Edit/Read symlink resolution — allow rules now check the resolved symlink target, not just the requested path
  • Crash on large session files — removing a message from files over 50MB no longer crashes
  • Prompt history with CJK/emoji — entries containing CJK or emoji were silently dropped at 4KB boundaries in ~/.claude/history.jsonl
  • /stats undercounting and data loss — was excluding subagent usage and losing historical data beyond 30 days on cache format changes
  • -p --resume hangs and deferred tool issues — hangs when deferred tool input exceeds 64KB or no deferred marker exists; -p --continue not resuming deferred tools
  • claude-cli:// deep links on macOS — now open correctly
  • MCP tool error truncation — multi-element error content from servers was truncating to only the first block
  • Skill reminders dropped with images — system context was lost when sending messages with images via the SDK
  • PreToolUse/PostToolUse hook file paths — now receive file_path as an absolute path for Write/Edit/Read tools, matching documented behavior
  • Autocompact thrash loop — now detects when context refills to the limit immediately after compacting three times and stops with an actionable error instead of burning API calls
  • Prompt cache misses in long sessions — caused by tool schema bytes changing mid-session
  • Nested CLAUDE.md re-injection — files were being re-injected dozens of times in long sessions that read many files
  • --resume crash with old CLI versions — transcript containing tool results from older CLI versions or interrupted writes
  • Misleading "Rate limit reached" message — now shows the actual entitlement error with actionable hints
  • Hook if condition filtering — wasn't matching compound commands (ls && git push) or commands with env-var prefixes (FOO=bar git push)
  • Collapsed search/read group badges duplicating — during heavy parallel tool use
  • Notification invalidates not clearing — currently-displayed notification wasn't being cleared immediately
  • Prompt disappearing after submit — when background messages arrived during processing
  • Devanagari and combining-mark text truncation — in assistant output
  • Rendering artifacts on main-screen terminals — after layout shifts
  • Voice mode microphone permission on macOS Apple Silicon — now requests permission correctly
  • Shift+Enter on Windows Terminal Preview 1.25 — was submitting instead of inserting a newline
  • UI jitter in iTerm2 with tmux — periodic jitter during streaming
  • PowerShell stderr reporting failures — tool incorrectly reported failures when commands like git push wrote progress to stderr on Windows PowerShell 5.1
  • Out-of-memory crash on very large files — Edit tool on files >1 GiB

Improved

  • Collapsed tool summary for ls/tree/du — now shows "Listed N directories" instead of "Read N files"
  • Bash tool formatter/linter warning — warns when a formatter/linter command modifies files you have previously read, preventing stale-edit errors
  • @-mention typeahead ranking — source files now rank above MCP resources with similar names
  • PowerShell tool prompt — version-appropriate syntax guidance (5.1 vs 7+)

Changed

  • Edit tool on Bash-viewed files — now works on files viewed via Bash with sed -n or cat, without requiring a separate Read call first
  • Hook output over 50K characters — saved to disk with a file path + preview instead of being injected directly into context
  • cleanupPeriodDays: 0 validation — now rejected with a validation error (previously silently disabled transcript persistence)
  • Thinking summaries default — no longer generated by default in interactive sessions; set showThinkingSummaries: true in settings.json to restore
  • PowerShell argument-splitting hardening — external-command arguments containing both a double-quote and whitespace now prompt instead of auto-allowing (PS 5.1)
  • /env command scope — now applies to PowerShell tool commands (previously only affected Bash)
  • /usage display — hides redundant "Current week (Sonnet only)" bar for Pro and Enterprise plans
  • Image paste behavior — no longer inserts a trailing space
  • !command in empty prompt — now enters bash mode, matching typed ! behavior

Docs

  • TaskCreated hook event — documented with its blocking behavior
  • Task notifications — preserved when backgrounding a running command with Ctrl+B

Easter egg: /buddy is here for April 1st — hatch a small creature that watches you code.

Update with: brew upgrade claude-code or download from code.claude.com.

Source: Claude Code