Symptom
HEAD : d45e9008 (old commit)
origin/main : 7f08c3ba
48 commits behind
Recurred four times in a single thread.
Why it's dangerous
Detection
import re vanished), the test count dropped sharply, a function you just wrote isn't there. That is an immediate git log --oneline -1.HEAD == origin/main as the first line of every session. For environments without hooks, pin it as step 1 of session start in the project guidelines too.Rules
git fetch origin main → confirm HEAD matches. Mismatch means resync before starting.Caught in the act
The hook caught the fourth occurrence. Uncommitted files were evacuated to the scratchpad, the repo resynced, the files restored. Not adding auto-reset was the right call.