You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sessionStart hook fires on every user message, not once per session #2491
The sessionStart hook fires on every user message within a conversation, not just once when the session is first created. Additionally, a sessionEnd hook fires after each agent response, before the next user message triggers sessionStart again. This makes sessionStart/sessionEnd behave as per-turn events rather than true session lifecycle events.
This is problematic for hooks that perform expensive one-time setup (dependency installation, environment provisioning, etc.) — they re-run on every single message.
Steps to Reproduce
Create a hooks file at .github/hooks/test-hook.json:
Any hook registered under sessionStart that performs expensive or non-idempotent work (installing dependencies, provisioning resources, sending notifications) will execute redundantly on every conversation turn, adding latency and unnecessary side effects.
Activity