claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] cursor <-> claude code integration does not work from inside tmux

Open ramarnat opened this issue 8 months ago • 9 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 1.0.1
  • Operating System: macOS 15.4
  • Terminal: Ghosttty + tmux

Bug Description

claude code running inside tmux wont see a running cursor instance when running /ide. I also have tmux auto start in cursor terminals, and that does not recognize that it is running inside cursor

Steps to Reproduce

  1. Run cursor
  2. start a tmux session
  3. run claude
  4. /ide Shows no available ides

Expected Behavior

Show running cursor. This works if I am not inside tmux

ramarnat avatar May 22 '25 19:05 ramarnat

Exporting TERM_PROGRAM=cursor should make it pick up that it's in Cursor. cursor will also need to be in the path for it to work

blois avatar May 22 '25 20:05 blois

Just tried it, didnt work.

➜  claude
╭───────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                                          
│                                                                    
│   /help for help, /status for your current setup                   
│                                                                    
│   cwd: /Volumes/devel/omniarcs/github.com/locusai/ike-base-replit  
╰───────────────────────────────────────────╯


> /ide
  ⎿  (no content)

! echo $TERM_PROGRAM
  ⎿  cursor

╭───────────────────────────────────────────╮
│                                                                      
│  Select IDE                                                          
│  Connect to an IDE for integrated development features.              
│                                                                      
│  No available IDEs detected. Make sure your IDE has the Claude Code  
│   extension or plugin installed and is running.                      
│                                                                      
╰───────────────────────────────────────────╯
 Esc to exit

(cursor is in the path)

ramarnat avatar May 22 '25 20:05 ramarnat

Ah, ok. I'm seeing an error:

! cursor --list-extensions
  ⎿  Unable to connect to VS Code server: Error in request.
     Error: connect ENOENT /tmp/vscode-ipc-13b05293-93fa-4a98-8a0d-d62186acfa94.sock

blois avatar May 22 '25 21:05 blois

I do see the extensions in my setup

! cursor --list-extensions
  ⎿  akamud.vscode-theme-onelight
     anthropic.claude-code
     … +22 lines (ctrl+r to expand)

> /ide
  ⎿  (no content)

╭──────────────────────────────────────────────────────
│                                                                                                                                                                                      │
│  Select IDE                                                                                                                                                                          │
│  Connect to an IDE for integrated development features.                                                                                                                              │
│                                                                                                                                                                                      │
│  No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.                                                                    │
│                                                                                                                                                                                      │
╰──────────────────────────────────────────────────────
 Esc to exit

ramarnat avatar May 22 '25 21:05 ramarnat

just adding on here that I am seeing similar issues in vs code insiders, vs code release version works fine. export TERM_PROGRAM=code-insiders does solve the issue though.

Update: this stopped working for some reason, not sure why.

skoonin avatar May 23 '25 00:05 skoonin

Same here

univers3 avatar May 23 '25 13:05 univers3

@ramarnat - are you running tmux in ghostty or in cursor's terminal? you have to run it in cursor terminal (without tmux) at least once to install. After that it should work.

igorkofman avatar May 29 '25 17:05 igorkofman

For folks for who it stopped working we should have a fix today.

igorkofman avatar May 29 '25 17:05 igorkofman

woot! Seems to be working now.

Image

This is in the cursor ide terminal

ramarnat avatar May 29 '25 17:05 ramarnat

I still have the issue, its working in normal terminal but not in tmux session the it does not find the ide.

fses91 avatar Jun 14 '25 10:06 fses91

It seems from the latest claude-code version 1.0.56, this suddenly doesn't work. It was working yesterday (or maybe two days ago)

tete1030 avatar Jul 20 '25 02:07 tete1030

cc version 1.0.62 -> Same issue is back

MrLeoCode avatar Jul 29 '25 17:07 MrLeoCode

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 06 '25 14:08 github-actions[bot]