Skip to content

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

@wmgreat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions