Continual Learning plugin – stop hook "Module not found"

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The continual-learning plugin’s stop hook fails with:

error: Module not found “./hooks/continual-learning-stop.ts”

The plugin’s hooks.json runs bun run ./hooks/continual-learning-stop.ts --trial, and that path is resolved from the workspace root instead of the plugin install directory. The script lives in the plugin folder, so it isn’t found.

Steps to Reproduce

  1. Install the continual-learning plugin in Cursor IDE.
  2. Start or stop an agent session that triggers the plugin’s stop hook.
  3. Observe the error: Module not found “./hooks/continual-learning-stop.ts”

Expected Behavior

The hook command should either use a path relative to the plugin install directory or otherwise ensure the script is found without per-workspace copies.

Workaround: Copy continual-learning-stop.ts from the plugin into each workspace’s hooks/ folder.

Operating System

MacOS

Version Information

IDE: Version 2.5.26

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, this is a known issue. Plugin hooks run with the cwd set to the workspace root, not the plugin directory. So relative paths like ./hooks/continual-learning-stop.ts can’t be found.

More details here: Inconsistent working directory for plugin hook commands

Instead of copying files into every workspace, you can manually edit the plugin’s hooks.json and use ${CURSOR_PLUGIN_ROOT}:

"command": "bun run ${CURSOR_PLUGIN_ROOT}/hooks/continual-learning-stop.ts --trial"

The plugin file is usually located under ~/.cursor/plugins/cache/....

This is a bug on our side. The error message that says “paths are relative to hooks.json” is also misleading. The team is aware, but there’s no ETA yet.

Great thank you!