Feature request for product/service
Cursor CLI
Describe the request
Expose is auto-run active in env var or hook input for preToolUse, subagentStart, beforeShellExecution, beforeMCPExecution, beforeReadFile or some of them.
Hi @ofir-drift,
Thanks for the feedback. It would help a lot if you could share more details about your use case. Specifically:
I built a notification system around the cursor hooks.
One of the features is to notify me that the agent requires a permission, I pass back {“permission”:“ask”} always.
I don’t want the notification to run when “auto-run” is enabled, I guess the current flow is agent requires perm → call hook → hook returns “ask” → is auto-run enabled → run or wait for user input.
I see 2 possible solutions for this:
I think knowing either auto-run enabled or not in the hook context will be more feature complete (solution 1)
Using hooks for notifications but wanting to suppress them when auto-run handles approvals automatically is a clean pattern.
Today, hooks don’t receive any information about the current auto-run state, so there’s no way to conditionally skip your notification logic. Your solution 1 (adding it to the hook input) would be the most flexible approach.
Thanks @mohitjain
Would this change will be introduced soon?
We’ll be tracking this post for the demand by users for this feature. No ETA yet.