Cursor is unable to execute shell commands from the chat because the commands are being blocked by the safety layer.
Steps to Reproduce
Steps to Reproduce:
Open a project in Cursor IDE.
Start a chat/agent conversation.
Ask the agent to execute a simple shell command, such as echo hello.
The command is blocked by the safety layer instead of being executed.
Repeat with other basic terminal commands and observe the same behavior.
Expected Behavior
Cursor should execute permitted, non-destructive shell commands through the integrated terminal when the user has granted the necessary terminal permissions. A harmless command such as echo hello should not be blocked by the safety layer.
The issue persists even when Cursor is configured with the most permissive execution settings.
Under Settings → Execution and Approvals, the Run Mode is set to “Run Everything”, which according to the UI should allow commands to run without approval, classification, or sandboxing.
Despite this configuration, the safety layer still blocks basic non-destructive shell commands (e.g. echo hello) from being executed through Cursor Chat/Agent. This behavior appears inconsistent with the selected execution mode and may indicate that the safety layer is overriding or ignoring the configured permissions.
Additionally, switching to the Legacy Terminal Tool does not resolve the issue. Commands remain blocked and are not executed, suggesting that the problem is not specific to the new terminal tool implementation.
Hey @Serhii_B, thanks for the report! Could you share a request ID from one of the blocked runs?
Could you also check whether you have any hooks configured (a hooks.json under .cursor/ in the project or in your home directory)? Also check under Cursor Settings → Customize → Hooks.
If a command is held for review, you should normally get an approval card in chat that lets you run it, so it’s very surprising to see the command skipped altogether!