Skip to content

copilot cli --continue can't trigger hooks #1084

Closed

Description

@wmgreat

Describe the bug

When using the --continue parameter, the configured sessionStart and sessionEnd hooks fail to trigger.

Affected version

0.0.392

Steps to reproduce the behavior

hooks config file like:
{
"version": 1,
"hooks": {
"sessionStart": [
{
"type": "command",
"bash": "echo "Session Start: $(date)" >> logs/session.log",
"cwd": ".",
"timeoutSec": 10,
"comment": "Initialize session tracking for auto-continue"
}
],
"sessionEnd": [
{
"type": "command",
"bash": "echo "Session End: $(date)" >> logs/session.log",
"cwd": ".",
"timeoutSec": 30,
"comment": "Check loop counter and continue if needed"
}
]
}
}

When executing : copilot -p "who are you" --continue --allow-all-tools, no logs are written to the log files. However, the command: copilot -p "who are you" --allow-all-tools works as expected."

Expected behavior

The --continue parameter can trigger the sessionStart and sessionEnd hooks.

Additional context

No response

Activity

  1. added theissue type on Jan 23, 2026
  2. nhickster commented on Jan 24, 2026

    @nhickster

    same issue for when you use the --resume flag, no hooks trigger on the resumed session.

  3. stephentoub commented on Apr 6, 2026

    @stephentoub

    I believe this issue has been fixed. I'm going to close it out, but if using the latest version you're still having issues, please feel free to re-open. Thanks.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions