#!/bin/bash # Pre-compact hook - saves context before compaction # Output reminds Claude to summarize important context set -euo pipefail echo "PreCompact:Callback hook success: Success" echo "PreCompact hook additional context: " echo "Context compaction is about to occur. Before compacting:" echo "1. Note any pending tasks or decisions that need to be preserved" echo "2. Summarize key context that should persist" echo "3. If working on a multi-step task, note current progress" echo ""