[BUG] claude code starts cursor ide
Environment
-
Platform (select one):
-
Claude CLI version: 1.0.30
-
Operating System: NixOS
-
Terminal: kitty, alacritty, xterm
Bug Description
When I start claude via the command line, it opens claude, and gives me the prompt as expected. However, it always launches cursor the IDE on a new window. I have no idea why it does that. I currently use cursor. This happen within any directory I am starting claude from
Steps to Reproduce
- Open a terminal.
- Start claude
- Claude starts in a terminal, opens Cursor in a new window
Expected Behavior
Claude code starts in the terminal and waits for user input.
Actual Behavior
Cursor is opened in the background, focus switches to it.
Additional Context
I tried installing cursor via npm, via migration, and through nix package manager. Behavior is the same. I also deleted ~/.claude.json and ~/.claude directory.
related https://github.com/anthropics/claude-code/issues/2397
how do we solve this? anyone has a workaround?
edit: i found a workaround.
the issue is that claude code is running cursor somehow when launched. so we gotta put up a fake shim/script that claude code sees instead of the real cursor binary.
- make sure your
~/.local/binis in PATH. its location in the path should be before the real cursor binary, you can substitute your own path,usr/local/binetc - inside your chosen path (
~/.local/bin) create the filecursorand inside put this:
#!/bin/sh
# shim to fully fake --version and suppress gui for non-interactive callers
case "$1" in
--version*|-v)
printf "1.1.6\n\
deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\n\
x64\n"
exit 0
;;
esac
- save the file and make it executable:
chmod +x ~/.local/bin/cursor
now when you launch claude code it should go to this shim we made and not launch cursor every time.
same here
this appears to have surfaced again, somehow - I assume this is probably a cursor issue to fix but making note since this is the first place that comes up when you google the issue