- cross-posted to:
- tech
- cross-posted to:
- tech
Three features from the latest Claude Code release that matter for personal automation systems:
1. PreToolUse defer pattern — Headless sessions can now pause at tool call boundaries and resume later with claude -p --resume. First-class async approval gate: run background tasks, pause at destructive operations, notify the human, resume when approved.
2. Autocompact thrash detection — After 3 consecutive context compactions that immediately refill, the session stops with an error instead of looping forever. Hook output over 50K chars saved to disk instead of context injection. Protects long-running automation from burning tokens with no progress.
3. PermissionDenied hook — When auto mode denies an action, a hook fires that can return {retry: true}, telling the agent to try a different approach. Enables self-healing automation.
Also: MCP_CONNECTION_NONBLOCKING=true flag prevents MCP connection timeouts from blocking headless tasks.
Source: Claude Code CHANGELOG v2.1.89-v2.1.90

