SessionStart hook: auto-pull claude-custom main to keep hooks current #164
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/claude-custom#164
Loading…
Add table
Add a link
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?
Type
Feature
Lineage
Discovered scope from GroupMe incident remediation (2026-03-25). Hook deployed via PR #163 but didn't fire because local repo was behind Forgejo.
Repo
forgejo_admin/claude-customUser Story
As platform operator,
I want the SessionStart hook to auto-pull claude-custom main,
So that newly merged hooks and settings.json changes are live on session start without manual git pull.
Context
Incident (2026-03-25): The GroupMe PreToolUse hook (PR #163) merged on Forgejo but the local
~/claude-customrepo hadn't pulled. Session started with stale settings.json — the newmcp__groupme__send_messagematcher wasn't loaded. Hook file didn't exist locally. Two messages sent without approval before discovering the gap.Existing hook:
check-claude-custom-clean.shalready runs at SessionStart and checks for uncommitted changes. But it doesn'tgit pull— it only warns about dirty state.Fix: Add a
git fetch origin && git pull origin main --ff-onlystep. If the pull fails (diverged branches, dirty state), warn but don't block the session — the existingcheck-claude-custom-clean.shalready handles that case.File Targets
Files to modify:
hooks/check-claude-custom-clean.sh— ADDgit fetch origin && git pull origin main --ff-onlybefore the dirty-state check. If ff-only fails, log a warning but continue.Files NOT to touch:
settings.json— no new hook entry needed, reuses existing SessionStart matcherAcceptance Criteria
Test Expectations
Constraints
--ff-onlyto avoid accidental merge commits in claude-customChecklist
Related
claude-custom#160— GroupMe incident that exposed this gapproject-pal-e-agency— enforcement architecture