Stop hooks can't see the compacted part of the transcript (transcript_path loses pre-compaction history)

Open 💬 0 comments Opened Jul 10, 2026 by TomasBihari

Context: solo owner running Claude Code across 4 projects with autonomous ticket-runner sessions (~1000 session transcripts / 17 days; systematic transcript audit 2026-06-23 → 2026-07-10). macOS, CLI + VSCode extension, worktrees, subagents, hooks.

Our Stop hook (definition-of-done guard) greps the session transcript to decide whether an autonomous runner may finish. After auto-compaction, work done earlier in the session (e.g. an issue-tracker transition to Done) is no longer in the transcript file the hook receives via transcript_path — the guard then re-escalates already-finished work.

Observed: 3–4 repeated false re-escalations in one session; ~5 sessions affected in the 17-day window.

Ask: give hooks access to the full pre-compaction history (or an index/markers file alongside the live transcript).

Happy to share sanitized transcript excerpts.

View original on GitHub ↗