In our company we have a private plugin in the Cursor Marketplace which contains some rules/skills/hooks. This plugin is installed by all employees and the hooks have some guardrails in place to guide an agent.
I noticed that these hooks are triggered in Cursor IDE but not in Cursor CLI.
The hooks are triggered correctly when I create these hooks in the .cursor directory in the root from the repo
Steps to Reproduce
Create a marketplace plugin with hooks and install the plugin. Run a prompt in Cursor CLI and notice the hook is not triggered.
Expected Behavior
I would expect that hooks and rules which are supported by Cursor CLI also work when loaded from a market place plugin in Cursor CLI.
Operating System
MacOS
Version Information
CLI Version 2026.06.19-20-24-33-653a7fb
Model Auto
Subscription Tier Enterprise
OS darwin (arm64)
Terminal iterm2
Shell zsh
This is a confirmed bug. The Cursor CLI doesn’t currently run hooks that come from an installed plugin (marketplace or local), even though it does load that plugin’s rules and skills and does run file-based hooks. That’s exactly why your guardrails fire in the IDE and when defined in a repo’s .cursor/hooks.json, but not from the plugin when you’re in the CLI.
In the meantime, the reliable workaround (which you’ve already found) is to define the hooks in a hooks.json file directly:
Project: .cursor/hooks.json in the repo root
User (applies globally): ~/.cursor/hooks.json
Both are picked up and run by the CLI. The format and locations are documented here: Hooks.
It’s not as clean as shipping the guardrails through your plugin - that’s the part that’s currently broken in the CLI. I’ve reported this to the team and will update this thread when there’s progress.
Hooks bundled in an installed plugin (Marketplace or local) now run in the Cursor CLI, the same way they do in the IDE. Update to the latest CLI release and your plugin’s guardrail hooks should fire!
Let us know if anything still doesn’t trigger after updating.