eca
eca copied to clipboard
Plugin hooks not fired for chatStart/chatEnd (timing issue)
Summary
Hooks defined by plugins (via hooks.json in the plugin directory) do not fire for chatStart and chatEnd event types. Hooks from the same plugins using other event types (e.g. postRequest, preToolCall) work fine.
Hooks defined directly in config.json with chatStart type do fire correctly.
Reproduction
- Install the
session-journalplugin which registerschatStartandchatEndhooks - Start a new chat
- Observe that the plugin's hooks are never executed
Workaround: define the hooks directly in config.json instead of relying on the plugin's hooks.json.
Likely cause
chatStart fires before plugin hooks are registered during initialization. Plugins that use postRequest or preToolCall work because those events fire later in the lifecycle, after plugins have been fully loaded.
Environment
- Tested with the
session-journalandnotify-hooksplugins notify-hooks(postRequest/preToolCall) works;session-journal(chatStart/chatEnd) does not- Hooks with identical structure in
config.jsonwork for all event types
done, available in the next reelase, LMK if any issues