`code .env.example` opens cursor agent

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

I was expecting to open the file .env.example when I do code .env.example, but it started cursor agent.
code example also starts the agent. But if I do code tmp.txt it is ok.

Steps to Reproduce

Open CLI
→ type code .env.example or cursor .env.example
→ observe that cursor agent is started

Expected Behavior

I expect to open the file .env.example or create a new one (as per existing behavior

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.6.26 (Universal)
VSCode Version: 1.99.3
Commit: 6af2d906e8ca91654dd7c4224a73ef17900ad730
Date: 2025-09-16T17:12:31.697Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. We’ll fix it. As a temporary workaround, try this command: cursor editor .env.example

It should be fixed now. Please update to v1.6.27 and let me know if the issue still persists.

Hey, this will be fixed in the next release. In the meantime, you can add CURSOR_CLI_BLOCK_CURSOR_AGENT=true to your .zshrc or .bashrc. This will solve the problem by automatically redirecting each command to the old Cursor CLI. We apologize for the inconvenience.

2 Likes

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.