Summary
annotate-clean.sh (SessionStart hook) ends with a backgrounded pre-warm line — ("${LIEN_CMD[@]}" --version >/dev/null 2>&1 &) — whose header comment claims it exists so "the first real hook call of the session doesn't pay a cold npx install." But that line is only reached in the branch where store="$(... "${LIEN_CMD[@]}" path --store ...)" (a few lines earlier, synchronous, unconditional) has already invoked LIEN_CMD successfully — i.e. in the one branch where the npx round-trip this line claims to "pre-warm" has already happened moments earlier in the same script. In the branch where the pre-warm would matter most (store resolution failing/empty), the script exits before ever reaching the pre-warm line.
Found on
- Hook source:
origin/main @ c973d7cb (fetched fresh for this session; origin/main has since advanced further, but this file is unrelated to and untouched by the intervening commits)
- Found during the 2026-08-07 nudge-hook dogfood session
Evidence
Forced the npx-fallback branch (hid the global lien binary from PATH, restored the sibling lien-npx-breaker.sh, invoked with an absolute path matching production's bash ${CLAUDE_PLUGIN_ROOT}/hooks/annotate-clean.sh) and measured: a standalone path --store call via the npx wrapper took 1.332s; the full annotate-clean.sh run in the same forced-npx state took 971ms total — one npx round-trip's worth of time, not two. The trailing pre-warm adds no observable extra latency (it isn't blocking), but it also isn't doing any warming the earlier mandatory call didn't already do for free whenever this line is even reached.
Impact
Low — no functional breakage, GC still works correctly. The only consequence is a misleading comment/dead-weight line: a future maintainer could reasonably (and incorrectly) conclude this line is what makes later hooks fast on a no-global-lien machine.
Suggested direction
Either delete the redundant line, or fix the comment to accurately describe what (if anything) it contributes beyond the mandatory path --store call directly above it.
Summary
annotate-clean.sh(SessionStart hook) ends with a backgrounded pre-warm line —("${LIEN_CMD[@]}" --version >/dev/null 2>&1 &)— whose header comment claims it exists so "the first real hook call of the session doesn't pay a cold npx install." But that line is only reached in the branch wherestore="$(... "${LIEN_CMD[@]}" path --store ...)"(a few lines earlier, synchronous, unconditional) has already invokedLIEN_CMDsuccessfully — i.e. in the one branch where the npx round-trip this line claims to "pre-warm" has already happened moments earlier in the same script. In the branch where the pre-warm would matter most (store resolution failing/empty), the script exits before ever reaching the pre-warm line.Found on
origin/main@c973d7cb(fetched fresh for this session;origin/mainhas since advanced further, but this file is unrelated to and untouched by the intervening commits)Evidence
Forced the npx-fallback branch (hid the global
lienbinary fromPATH, restored the siblinglien-npx-breaker.sh, invoked with an absolute path matching production'sbash ${CLAUDE_PLUGIN_ROOT}/hooks/annotate-clean.sh) and measured: a standalonepath --storecall via the npx wrapper took 1.332s; the fullannotate-clean.shrun in the same forced-npx state took 971ms total — one npx round-trip's worth of time, not two. The trailing pre-warm adds no observable extra latency (it isn't blocking), but it also isn't doing any warming the earlier mandatory call didn't already do for free whenever this line is even reached.Impact
Low — no functional breakage, GC still works correctly. The only consequence is a misleading comment/dead-weight line: a future maintainer could reasonably (and incorrectly) conclude this line is what makes later hooks fast on a no-global-
lienmachine.Suggested direction
Either delete the redundant line, or fix the comment to accurately describe what (if anything) it contributes beyond the mandatory
path --storecall directly above it.