SessionStart guard: which sources should it fire on — `clear` only, or `startup` and `compact` too? nf-d13 ← Beads

open priority 2 task unassigned needs:direction

Twinned from https://github.com/cfsh/ninefold/issues/774 by tools/beads/import_github.py's reconcile pass.

#772 adds a SessionStart hook (matcher clear) that reports the worktree's branch and fast-forwards a clean main. SessionStart fires on three sources, and the same hazard — a long-lived worktree the last occupant left on a feature branch — exists at all three. This issue is one question about all of them.

⚠️ Rewritten 2026-08-09: an earlier version of this body and a later comment recommended different defaults. One default now stands, below.

The three sources

| source | fires when | argument against firing | |---|---|---| | clear | @aedanpope clears a dev | none — this is the ask, shipped in #772 | | startup | a new claude process starts in the worktree | none found. spawn_dev.py puts fresh worktrees on a known branch, so it would usually be quiet; a resumed session in a worktree the previous chunk left on feat/… is exactly the hazard | | compact | context runs out mid-chunk | real. A compaction mid-chunk legitimately leaves a session on its feature branch, so OFF-MAIN fires every time and trains the reader to skip the whole notice |

Options
If B is taken

CLAUDE.md's line "It does not fire on startup or resume, so run it by hand there" goes stale with it and must change in the same PR.

Default ships if unanswered — nothing is blocked on this. #772 merges as clear-only either way.

Dependencies

None.

Comments

No comments.

Add a comment