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
kiro-cli v3: SessionStart hooks run when the first prompt is sent, not when the session starts #12109
An agent's SessionStart hooks do not run when kiro-cli chat --agent <name> opens the session. They run only when the user sends the first prompt. A hook meant to prepare the session (log the start, load project status, warm a cache) therefore runs late, and does not run at all if the user only uses slash commands or ! shell escapes.
Steps to Reproduce
In an empty folder, create .kiro/agents/hookagent.json:
Run : > /tmp/hook.log; kiro-cli chat --agent hookagent and trust the workspace.
Wait 25 seconds without typing. In another terminal, run cat /tmp/hook.log. Observed: empty.
Send any prompt, for example Reply with only OK., and check the log again.
Observed in one run: session ready at 08:07:32; log still empty after 25 s idle; prompt sent at 08:08:27; log then shows 08:08:28 hook-A and 08:08:28 hook-B. A second prompt adds nothing, so the hooks run once per session, but at the first prompt.
Expected Behavior
SessionStart hooks run when the session is created, before the first prompt. If first-prompt timing is intended, the hooks documentation should say so, because the trigger name says "session start".
Conversation ID
No response
Additional Context
Both hooks run, in order; only the timing is in question.
Thanks for opening this issue and for the detailed reproduction steps! You've clearly identified that SessionStart hooks are firing on the first prompt rather than when the session is actually created, which is a meaningful distinction. A maintainer will take a look at this shortly — we appreciate you helping us make Kiro's hook behavior match what developers expect! 🙌
An agent's SessionStart hooks are firing when the first prompt is sent rather than when kiro-cli chat --agent <name> opens the session. This breaks use cases where hooks are meant to prepare the session environment before any user interaction, such as logging session metadata or setting up context.
Activity
github-actions commentedon Oct 25, 2026
Thanks for opening this issue and for the detailed reproduction steps! You've clearly identified that
SessionStarthooks are firing on the first prompt rather than when the session is actually created, which is a meaningful distinction. A maintainer will take a look at this shortly — we appreciate you helping us make Kiro's hook behavior match what developers expect! 🙌AnilMaktala commentedon Oct 26, 2026
Thanks for raising this.
An agent's
SessionStarthooks are firing when the first prompt is sent rather than whenkiro-cli chat --agent <name>opens the session. This breaks use cases where hooks are meant to prepare the session environment before any user interaction, such as logging session metadata or setting up context.Marking this as a bug to investigate further.