The Stop guard keys on the working tree, not on the session #3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Field report from installing
f498b6fon 2026-09-12 into a real, busy repository (Python app, ~1,500 tests, background jobs that write tracked data files, a 120 KB CLAUDE.md).Environment: Windows 11, Git for Windows (bash 5.3.9,
core.autocrlf=truefromthe system gitconfig), Python 3.14 (
python3is the WindowsApps alias and works),Claude Code 2.1.269 → 2.1.270.
How it was checked: the kit's own suite; the hooks driven exactly as
settings.jsonholds them; and four live headlessclaude -psessions readingthe
hook_responseevents. Nothing here was run on Linux or macOS.The Stop guard keys on the tree, not on the session
git status --porcelaindescribes the working tree. "This session changedfiles" is a claim about the session. They diverge whenever a tree is already
dirty when a session starts: long-lived work in progress, or background jobs
that write tracked files.
What happened in our repo:
nearly every session, including sessions that only answered a question.
second turn explaining the change was not its own (
num_turns: 2).later in the same session is never prompted. The guard is wrong at the
start and absent at the end.
wiki/edit left by an earlier sessionsilences the guard for every later session.
We have switched the Stop hook off in our repo until this changes.
Proposal (untested):
session_id(for example thegit status --porcelain -zoutput, or a hash per path).and wiki paths did not.
work can prompt again.
Companion issues from the same install: #4 (Windows defects, with a tested patch) and #5 (smaller findings).