Skip to content

sessionStart hook is never fired #2415

@ytx

Description

@ytx

Describe the bug

Title: sessionStart hook is never fired

Description:

The sessionStart hook defined in .github/hooks/*.json is never executed, regardless of how the session is started (copilot fresh start, copilot --continue, or /resume).

Environment:

  • Copilot CLI on macOS
  • Hook config: .github/hooks/parallela.json

Expected behavior:
sessionStart fires when a new session begins or an existing session is resumed, as documented at https://docs.github.com/en/copilot/concepts/agents/coding-agent/about-hooks

Actual behavior:

  • sessionEnd fires correctly on /exit
  • userPromptSubmitted, preToolUse, agentStop all fire correctly
  • sessionStart never fires — the hook script is never called

Verification:
Added logging to the hook script. Logs from all other hooks appear, but sessionStart produces no output at all, confirming the hook is not being invoked.

Workaround:
Currently detecting session start inside the userPromptSubmitted hook by checking for the absence of a session marker file.

Affected version

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions