Skip to content

sessionStart hook in .github/hooks/ does not fire in Copilot CLI (v0.0.420) #1730

Description

@jiaczh

Describe the bug

sessionStart hooks defined in .github/hooks/*.json do not execute when starting a Copilot CLI session.

Environment

  • CLI version: v0.0.420
  • OS: Windows 11
  • Shell: PowerShell 7

Hook configuration

File: .github/hooks/test-hook.json

{
  "version": 1,
  "hooks": {
    "sessionStart": [
      {
        "type": "command",
        "bash": "echo \"Session started: $(date)\" >> logs/session.log",
        "powershell": "Add-Content -Path logs/session.log -Value \"Session started: $(Get-Date)\"",
        "cwd": ".",
        "timeoutSec": 10
      }
    ]
  }
}

Expected behavior

logs/session.log should be created with a timestamp entry when a CLI session starts.

Actual behavior

logs/session.log is never created. The sessionStart hook does not fire.

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:pluginsPlugin system, marketplace, hooks, skills, extensions, and custom agents

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions