From 9206931a3ce9eb2832ee483cd5fba82099ec4ef5 Mon Sep 17 00:00:00 2001 From: lmiranda Date: Thu, 22 Jan 2026 10:07:12 -0500 Subject: [PATCH] fix: correct SessionStart hook structure in projman and pr-review Remove incorrect nested matcher/hooks structure from SessionStart hooks. SessionStart events don't use matchers - that format is only for tool-based hooks like PreToolUse/PostToolUse. Fixes recurring "SessionStart:startup hook error" on Claude Code startup. Co-Authored-By: Claude Opus 4.5 --- plugins/pr-review/hooks/hooks.json | 9 ++------- plugins/projman/hooks/hooks.json | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/plugins/pr-review/hooks/hooks.json b/plugins/pr-review/hooks/hooks.json index d6bde9d..45245d4 100644 --- a/plugins/pr-review/hooks/hooks.json +++ b/plugins/pr-review/hooks/hooks.json @@ -2,13 +2,8 @@ "hooks": { "SessionStart": [ { - "matcher": ".*", - "hooks": [ - { - "type": "prompt", - "prompt": "Silently check if the project's git remote matches the .env configuration:\n\n1. Read .env to get GITEA_ORG and GITEA_REPO values\n2. Run: git remote get-url origin\n3. Extract org and repo from the remote URL\n4. Compare with .env values\n\nIf mismatch detected:\n- Display a brief warning: 'Repository location mismatch detected. Git remote shows / but .env has /. Run /project-sync to update.'\n\nIf match or no .env exists: Stay silent, do not interrupt.\n\nThis check should be quick and non-blocking." - } - ] + "type": "prompt", + "prompt": "Silently check if the project's git remote matches the .env configuration:\n\n1. Read .env to get GITEA_ORG and GITEA_REPO values\n2. Run: git remote get-url origin\n3. Extract org and repo from the remote URL\n4. Compare with .env values\n\nIf mismatch detected:\n- Display a brief warning: 'Repository location mismatch detected. Git remote shows / but .env has /. Run /project-sync to update.'\n\nIf match or no .env exists: Stay silent, do not interrupt.\n\nThis check should be quick and non-blocking." } ] } diff --git a/plugins/projman/hooks/hooks.json b/plugins/projman/hooks/hooks.json index d6bde9d..45245d4 100644 --- a/plugins/projman/hooks/hooks.json +++ b/plugins/projman/hooks/hooks.json @@ -2,13 +2,8 @@ "hooks": { "SessionStart": [ { - "matcher": ".*", - "hooks": [ - { - "type": "prompt", - "prompt": "Silently check if the project's git remote matches the .env configuration:\n\n1. Read .env to get GITEA_ORG and GITEA_REPO values\n2. Run: git remote get-url origin\n3. Extract org and repo from the remote URL\n4. Compare with .env values\n\nIf mismatch detected:\n- Display a brief warning: 'Repository location mismatch detected. Git remote shows / but .env has /. Run /project-sync to update.'\n\nIf match or no .env exists: Stay silent, do not interrupt.\n\nThis check should be quick and non-blocking." - } - ] + "type": "prompt", + "prompt": "Silently check if the project's git remote matches the .env configuration:\n\n1. Read .env to get GITEA_ORG and GITEA_REPO values\n2. Run: git remote get-url origin\n3. Extract org and repo from the remote URL\n4. Compare with .env values\n\nIf mismatch detected:\n- Display a brief warning: 'Repository location mismatch detected. Git remote shows / but .env has /. Run /project-sync to update.'\n\nIf match or no .env exists: Stay silent, do not interrupt.\n\nThis check should be quick and non-blocking." } ] } -- 2.49.1