Thanks for the detailed report! This is actually intentional behavior, though I agree it’s surprising.
For plugin hooks specifically, the stop hook runs with the project root as its working directory so that Claude Code-compatible plugins can find state files (like .claude/). All other plugin hooks (postToolUse, etc.) run from the plugin’s install path, ensuring that relative paths within the plugin resolve correctly.
Rather than relying on pwd, you can use these environment variables, which are consistent across all hook steps:
$CURSOR_PROJECT_DIR: always the project/workspace root$CURSOR_PLUGIN_ROOT: always the plugin’s install directory
We have an existing issue tracking improvements to make this less confusing.