Cursor CLI is not setting CURSOR_AGENT=1 environment variable while executing bash commands

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

Cursor CLI is not setting CURSOR_AGENT=1 environment variable while executing terminal commands

Steps to Reproduce

Have the agent execute “env” command to see the environment variables during execution

Expected Behavior

CURSOR_AGENT=1 must be present

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

$ cursor-agent -version
2025.08.27-24c29c1

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report!

It looks like this behaviour got accidentally removed, but I’ve just re-added it back in, so it should be available in the next CLI update - these happen automatically, but I’m checking with the team to confirm when this should be pushed out!

1 Like