Cursor command doesn't work

I’m having this same issue, and “There are currently no updates available” when I run “Check for Updates…”

Version: 1.6.23 (Universal)
VSCode Version: 1.99.3
Commit: 9b5f3f4f2368631e3455d37672ca61b6dce85430
Date: 2025-09-15T21:47:50.112Z
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

Doesn’t stop me from using Cursor, just breaks a bunch of my scripts and is real annoying.

cursor .
cursor-agent not found, installing via Cursor CLI | Cursor - The AI Code Editor
same issue.

I can’t use shell command `cursor`.

Version: 1.6.26
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 23.1.0

@sanjeed5
I’m sure the team is busy, but any chance we could get an update on this issue?

As many have pointed out already, the underlying cause is that v1.6 shipped with changed versions of the cursor/code shell scripts, which fundamentally changed the behavior, and can’t be fixed by just reinstalling the shell commands via the Command Palette, since that just reinstalls using the new scripts.

This change is problematic for quite a few reasons:

  • The cursor command now behaves as basically an alias for cursor-agent, which not only confuses any humans running the command (bad UX), but also breaks any scripts that were written to use the old behavior (way worse).
  • The cursor command now behaves differently from its official documentation, which wasn’t updated to reflect this change.
  • The old cursor and cursor-agent have different APIs, so the new behavior is not just different, it’s actually incompatible with the old, since the old and new take different arguments. This also means that the new script’s fallback to the old behavior doesn’t even make sense (fallback_to_cursor_cli).
  • The new script downloads and runs the install script without explicit user intent. This is at best a somewhat misguided piece of convenience (not everyone uses cursor-agent), but technically opens a giant can of worms around security. Especially since it swallows the output.
  • As far as I can tell, this change wasn’t documented anywhere at all (though it was flagged prior to release), which made for an unpleasant surprise. And the actual code changes and comments look to be intentional, which just adds a layer of confusion about whether this was a planned change or some accident.
  • The new behavior includes an opt-out (CURSOR_CLI_BLOCK_CURSOR_AGENT), but this should really be an opt-in change, so that users can control exactly when they switch over to the new behavior, just as a matter of general UX and API design.
  • And frankly, who asked for this? If people want the aliasing for their own convenience, they can easily add their own alias in their own environment. Assuming that was even the intention.

So as it stands, this looks like an intentional but undocumented breaking change that downloads and runs arbitrary code without asking, deviates from official docs, is inconsistent with itself, that no one asked for, and puts the burden on the user to opt-out of, once they even figure out what’s going on. Just a bad look any way you slice it.

My suggestion is to simply revert the scripts to exactly what they were before, bringing back the old behavior. That seems like it should be an easy solution (barring something weird like Cursor internals now depend on this aliasing, which… say it ain’t so). Then the team can address these issues in a better future rollout, with more time and communication, if the change is still deemed desirable, for some reason.

I really hope this was just an unfortunate confluence of mistakes, and not some dumb shenanigans.

Anyway, an update would be great. Thanks!

For completeness, the current version (v1.6.26) of the cursor script looks like this:

#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

function app_realpath() {
	SOURCE=$1
	while [ -h "$SOURCE" ]; do
		DIR=$(dirname "$SOURCE")
		SOURCE=$(readlink "$SOURCE")
		[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
	done
	SOURCE_DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
	echo "${SOURCE_DIR%%${SOURCE_DIR#*.app}}"
}

function fallback_to_cursor_cli() {
	if [ -n "$CURSOR_CLI" ]; then
		# Falling back to direct CLI execution
		eval "$CURSOR_CLI" "$@"
	else
		echo "Error: Neither cursor-agent nor fallback CLI found. Please install Cursor properly." 1>&2
		exit 1
	fi
}

function find_cursor_cli() {
	# Clear the output variables
	CURSOR_CLI=""
	CURSOR_CLI_MODE=""

	# when run in remote terminal, use the remote cli
	if [ -n "$VSCODE_IPC_HOOK_CLI" ]; then
		REMOTE_CLI="$(which -a 'cursor' | grep /remote-cli/)"
		if [ -n "$REMOTE_CLI" ]; then
			CURSOR_CLI="$REMOTE_CLI"
			CURSOR_CLI_MODE="remote"
			return 0
		fi
	fi

	# Otherwise, use the electron app
	APP_PATH="$(app_realpath "${BASH_SOURCE[0]}")"
	if [ -z "$APP_PATH" ]; then
		echo "Unable to determine app path from symlink : ${BASH_SOURCE[0]}" >&2
		return 1
	fi
	CONTENTS="$APP_PATH/Contents"
	ELECTRON="$CONTENTS/MacOS/Cursor"
	CLI="$CONTENTS/Resources/app/out/cli.js"
	CURSOR_CLI="ELECTRON_RUN_AS_NODE=1 \"$ELECTRON\" \"$CLI\""
	CURSOR_CLI_MODE="local"
	return 0
}

# Main execution
export VSCODE_NODE_OPTIONS=$NODE_OPTIONS
export VSCODE_NODE_REPL_EXTERNAL_MODULE=$NODE_REPL_EXTERNAL_MODULE
unset NODE_OPTIONS
unset NODE_REPL_EXTERNAL_MODULE

# If cursor-agent exists, try to find CURSOR_CLI but don't fail if we can't
if find_cursor_cli 2>/dev/null; then
	# Export both variables if we found them
	if [ -n "$CURSOR_CLI" ]; then
		export CURSOR_CLI
		export CURSOR_CLI_MODE
	fi
fi

if [ "$CURSOR_CLI_BLOCK_CURSOR_AGENT" = "true" ]; then
  # cursor-agent is forbidden, call cursor CLI directly
	fallback_to_cursor_cli "$@"
fi

AGENT_JUST_INSTALLED=false
if ! command -v ~/.local/bin/cursor-agent >/dev/null 2>&1; then
	echo "cursor-agent not found, installing via https://cursor.com/install ..."
	curl -sS https://cursor.com/install | bash >/dev/null 2>&1
	# Remove the previous log line from the terminal output
	tput cuu1 && tput el
	AGENT_JUST_INSTALLED=true
fi

# Check current cursor-agent version meets minimum version requirement
# If it fails with exit code 2 (version too old), update and retry
OUTPUT=$({ ~/.local/bin/cursor-agent --min-version=2025.09.04 status; } 2>&1)
EXIT_CODE=$?

# Update and retry if cursor was not just installed and:
#  - exit code is 2 (version too old), OR
#  - exit code is 1 and output contains "unknown option" (old agent CLI version doesn't have the --min-version option)
if { [ "$EXIT_CODE" -eq 2 ] || { [ "$EXIT_CODE" -eq 1 ] && echo "$OUTPUT" | grep -qi "unknown option"; }; }; then
	echo "cursor-agent version is outdated, updating..."
	~/.local/bin/cursor-agent update >/dev/null 2>&1
	# Remove the previous log line from the terminal output
	tput cuu1 && tput el
	# Check new version to see if minimum version requirement is met
	OUTPUT2=$({ ~/.local/bin/cursor-agent --min-version=2025.09.04 status; } 2>&1)
	EXIT_CODE2=$?
	if { [ "$EXIT_CODE2" -eq 2 ] || { [ "$EXIT_CODE2" -eq 1 ] && echo "$OUTPUT2" | grep -qi "unknown option"; }; }; then
		# If the second attempt also fails, just try CURSOR_CLI as a fallback
		fallback_to_cursor_cli "$@"
	else
		# min-version is met, run cursor-agent
		export CURSOR_CLI_COMPAT=1
		exec ~/.local/bin/cursor-agent "$@"
	fi
else
	# min-version is met, run cursor-agent
	export CURSOR_CLI_COMPAT=1
	exec ~/.local/bin/cursor-agent "$@"
fi

:smiling_face_with_tear:

1 Like

guess the bash scripts are not part of any testing suite … :smiling_face_with_tear:

this is pretty tragic

Hey, thanks everyone for the report! It should be fixed now. Please update to v1.6.27 and let me know if the issue still persists.

Still seeing the same issue.
Upgraded to 1.6.27
Uninstalled cursor command
Reinstalled cursor command
Getting this error:
cursor .
/usr/local/bin/cursor: line 113: /Users/username/.local/bin/cursor-agent: No such file or directory
/usr/local/bin/cursor: line 113: exec: /Users/username/.local/bin/cursor-agent: cannot execute: No such file or directory

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

cursor /work/dir --remote "ssh-remote+user@host" no longer works and instead opens up a cursor agent. cursor editor /work/dir --remote "ssh-remote+user@host" also does not work.

How do I open a remote editor from the command line?

Steps to Reproduce

See bug description.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.6.23 (Universal)
VSCode Version: 1.99.3
Commit: 9b5f3f4f2368631e3455d37672ca61b6dce85430
Date: 2025-09-15T21:49:07.231Z
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

It looks like the only change in the cursor script between v1.6.26 and v1.6.27 was adding exit $? inside fallback_to_cursor_cli, which doesn’t look like it’d solve the problem.

From the v1.6.26 script:

function fallback_to_cursor_cli() {
	if [ -n "$CURSOR_CLI" ]; then
		# Falling back to direct CLI execution
		eval "$CURSOR_CLI" "$@"
	else
		echo "Error: Neither cursor-agent nor fallback CLI found. Please install Cursor properly." 1>&2
		exit 1
	fi
}

From the v1.6.27 script:

function fallback_to_cursor_cli() {
	if [ -n "$CURSOR_CLI" ]; then
		# Falling back to direct CLI execution
		eval "$CURSOR_CLI" "$@"
		exit $?
	else
		echo "Error: Neither cursor-agent nor fallback CLI found. Please install Cursor properly." 1>&2
		exit 1
	fi
}

Maybe someone closer to the technical change could help shed some light on this?

  • what was actually changed, and whether it was intended as a breaking change (in the API/versioning sense)
  • why it was changed
  • why a breaking change like this wasn’t documented (unless it was, and we missed it)

At this point, the “why” is perhaps just as important as the “what”.

Hi, the exit $? line was added in order to not run both the fallback and cursor-agent cli sequentially, this fixed that.

Could you share the version of cursor-agent that you are using? Does cursor-agent update resolve the problem?

still seeing the same issue in 1.6.27 on macOS

Hey everyone, 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.

If anyone else is stuck at this step:

/usr/local/bin/cursor: line 113: /Users/username/.local/bin/cursor-agent: No such file or directory
/usr/local/bin/cursor: line 113: exec: /Users/username/.local/bin/cursor-agent: cannot execute: No such file or directory

…my specific issue was that my ~/.local was owned by root due to me using sudo on something when I shouldn’t have, forever ago. Resetting that via:

sudo chown -R username:staff ~/.local

allowed the subsequent cursor to successfully install cursor-agent in /Users/username/.local/bin/

In my case, it turned out that my local “/Users/username/.local/bin” is actually a file rather than a folder. I renamed this bin file and run the install script in sudo mode (it failed w/o sudo). Then it worked!

This should already be fixed. Please update to v1.6.35 and let me know if the issue persists.

It is absolutely unacceptable to break auto-updating software like this and force however many thousands of users to go digging for forum posts to fix your screw-ups.

Learn what proper testing and software development is.

I post a comment criticizing you and it’s deleted within 30 seconds? I’ll repost this again and again.

What a ■■■■■■■ joke of a company.

版本: 1.7.12 (Universal)

提交: 1.99.3

日期: b3f1951240d5016648330fab51192dc03e8d7050

Electron: 2025-09-28T00:58:08.696Z (1 天前)

ElectronBuildId: 34.5.8

Chromium: undefined

Node.js: 132.0.6834.210

V8: 20.19.1

OS: 13.2.152.41-electron.0

same issue

Thanks for the info, the team is already looking into this.