{"version":"2.1.21","anchor":"enhanced-hook-system-for-sdk-integration","canonical_anchor":"enhanced-hook-system-for-sdk-integration","heading":"Enhanced Hook System for SDK Integration","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.21\/e\/enhanced-hook-system-for-sdk-integration","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.21","markdown":"### Enhanced Hook System for SDK Integration\n\n**What**\n\nThe compacting system now uses structured progress callbacks instead of text spinner messages, enabling better programmatic integration.\n\n**Details**\n\n- New `onCompactProgress` callback with `{ type, hookType }` events\n- Hook types include `\"pre_compact\"` and `\"session_start\"`\n- Event types: `\"hooks_start\"` when hooks begin execution\n- Replaces legacy `setSpinnerMessage` calls with structured events\n- UI still displays \"Running PreCompact hooks\u2026\" and \"Running SessionStart hooks\u2026\" but via event-driven rendering\n\n**Evidence**\n\nLine 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\u2026\"`)"}