Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.21 ·

Enhanced Hook System for SDK Integration

Entry
JSON All of v2.1.21
EntryKind: in v2.1.21,
ChangesSection of the release
What

The compacting system now uses structured progress callbacks instead of text spinner messages, enabling better programmatic integration.

Details
  • New onCompactProgress callback with { type, hookType } events
  • Hook types include "pre_compact" and "session_start"
  • Event types: "hooks_start" when hooks begin execution
  • Replaces legacy setSpinnerMessage calls with structured events
  • UI still displays "Running PreCompact hooks…" and "Running SessionStart hooks…" but via event-driven rendering
Evidence

Line 449199 (hook start event, K.onCompactProgress?.({ type: "hooks_start", hookType: "pre_compact" })), line 449280 (session start event, hookType: "session_start"), line 571772 (UI rendering, contains "Running PreCompact hooks…")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.21 →

Feedback