Claude Code v2.1.89 adds deferrable hooks, permission retry, and fixes memory leaks

Release v2.1.89: Hook improvements and critical fixes
Claude Code v2.1.89 adds several hook enhancements and addresses stability issues affecting long-running sessions. The release focuses on permission management, terminal rendering, and fixing crashes that could occur with large files or complex workflows.
New features and improvements
- Deferrable PreToolUse hooks: Added "defer" permission decision to PreToolUse hooks. Headless sessions can pause at a tool call and resume with
-p --resumeto have the hook re-evaluate. - PermissionDenied hook: Added hook that fires after auto mode classifier denials. Return
{retry: true}to tell the model it can retry. - Auto mode improvements: Denied commands now show a notification and appear in
/permissions → Recenttab where you can retry withr. - Environment variables: Added
CLAUDE_CODE_NO_FLICKER=1environment variable to opt into flicker-free alt-screen rendering with virtualized scrollback. AddedMCP_CONNECTION_NONBLOCKING=truefor-pmode to skip the MCP connection wait entirely. - Subagent mentions: Added named subagents to
@mention typeahead suggestions. - MCP connection timeout: Bounded
--mcp-configserver connections at 5s instead of blocking on the slowest server. - Tool summary improvements: Improved collapsed tool summary to show "Listed N directories" for
ls / tree / duinstead of "Read N files".
Critical fixes
- Memory leak: Fixed memory leak where large JSON inputs were retained as LRU cache keys in long-running sessions.
- StructuredOutput failures: Fixed StructuredOutput schema cache bug causing ~50% failure rate when using multiple schemas.
- Large file crashes: Fixed a potential out-of-memory crash when the Edit tool was used on very large files (>1 GiB).
- Session file crashes: Fixed a crash when removing a message from very large session files (over 50MB).
- LSP server recovery: Fixed LSP server zombie state after crash — server now restarts on next request instead of failing until session restart.
- Autocompact thrashing: Fixed autocompact thrash loop — now detects when context refills to the limit immediately after compacting three times in a row and stops with an actionable error instead of burning API calls.
Platform-specific fixes
- Windows: Fixed Edit/Write tools doubling CRLF on Windows and stripping Markdown hard line breaks (two trailing spaces). Fixed PowerShell tool incorrectly reporting failures when commands like
git pushwrote progress to stderr on Windows PowerShell 5.1. Fixed Shift+Enter submitting instead of inserting a newline on Windows Terminal Preview 1.25. - macOS: Fixed
claude-cli://deep links not opening on macOS. Fixed voice mode failing to request microphone permission on macOS Apple Silicon. - Cross-platform: Fixed voice push-to-talk not activating for some modifier-combo bindings, and voice mode on Windows failing with "WebSocket upgrade rejected with HTTP 101".
Additional fixes
- Permission rules: Fixed
Edit(//path/**)andRead(//path/**)allow rules to check the resolved symlink target, not just the requested path. - Hook conditions: Fixed hooks
ifcondition filtering not matching compound commands (ls && git push) or commands with env-var prefixes (FOO=bar git push). - Path handling: Fixed PreToolUse/PostToolUse hooks to receive
file_pathas an absolute path for Write/Edit/Read tools, matching the documented behavior. - Resume functionality: Fixed
-p --resumehangs when the deferred tool input exceeds 64KB or no deferred marker exists, and-p --continuenot resuming deferred tools. Fixed--resumecrash when transcript contains a tool result from an older CLI version or interrupted write. - Error messages: Fixed misleading "Rate limit reached" message when the API returned an entitlement error — now shows the actual error with actionable hints.
- Data persistence: Fixed prompt history entries containing CJK or emoji being silently dropped when they fall on a 4KB boundary in
~/.claude/history.jsonl. Fixed/statsundercounting tokens by excluding subagent usage, and losing historical data beyond 30 days when the stats cache format changes. - MCP errors: Fixed MCP tool errors truncating to only the first content block when the server returns multi-element error content.
- Context management: Fixed skill reminders and other system context being dropped when sending messages with images via the SDK. Fixed nested
CLAUDE.mdfiles being re-injected dozens of times in long sessions that read many files. - Rendering issues: Fixed Devanagari and other combining-mark text being truncated in assistant output. Fixed rendering artifacts on main-screen terminals after layout shifts. Fixed periodic UI jitter during streaming in iTerm2 when running inside tmux.
- Cache issues: Fixed prompt cache misses in long sessions caused by tool schema bytes changing mid-session.
- UI notifications: Fixed notification
invalidatesnot clearing the currently-displayed notification immediately. Fixed prompt briefly disappearing after submit when background messages arrived during processing. - Terminal badges: Fixed collapsed search/read group badges duplicating in terminal scrollback during heavy parallel tool use.
This release primarily benefits developers using Claude Code for extended coding sessions, particularly those working with large files, complex permission systems, or headless automation workflows.
📖 Read the full source: GitHub Claude-Code
👀 See Also

Anthropic's Claude Mythos: Fear Marketing or Real Risk?
Anthropic claims its Claude Mythos model excels at cybersecurity bug finding, but critics argue the company's warnings of catastrophe are a marketing ploy to distract from current harms and sway regulators.

SPLICE Benchmark Reveals VLMs Struggle with Temporal Reasoning, Rely on Language Priors
Research presented at EMNLP 2025 shows vision-language models score poorly on a video sequencing task where humans excel, with models like Gemini 2.0 Flash reaching 51% accuracy versus human performance of 85%. Models frequently rely on visual shortcuts and language descriptions rather than true visual understanding.

AI Eats the World (Spring 2026) – A Comprehensive Market Analysis
An in-depth PDF report on AI industry trends, market sizes, and adoption metrics for Spring 2026, covering key technologies, players, and forecasts.

Claude Pro Subscription Bug: Paid Users Stuck on Free Plan
A bug in Claude Pro after using a gift pass leaves accounts stuck on Free despite successful payment and receipts. Anthropic support unresponsive for a week.