Cursor "No ptyHost heartbeat after 6 seconds" Bug Report

Environment Details

  • OS: Linux (Mint linux xfce), kernel 5.15.0-140-generic)
  • Cursor Version: 0.50.4
  • AppImage Launch Method: Standard AppImage execution

Issue Description

When launching Cursor on Linux, terminal functionality is severely impacted by persistent “No ptyHost heartbeat after 6 seconds” errors. These errors occur regardless of configuration tweaks, rendering the integrated terminal essentially unusable with constant freezes every 6 seconds.

Symptoms

  • Terminal freezes/hangs periodically with “No ptyHost heartbeat after 6 seconds” messages
  • Initial errors about “Unable to resolve your shell environment in a reasonable time”
  • Terminal becomes non-responsive after several minutes of use
  • Issue persists even with completely clean shell configurations

Attempted Solutions

I’ve tried literally everything short of rewriting Cursor’s source code myself:

  1. Modified .bashrc to remove slow-loading components (conda/nvm)
  2. Created clean minimal launcher scripts that bypass shell initialization
  3. Set environment variables to disable shell resolution (VSCODE_SKIP_RESOLVING_SHELL_ENV=1)
  4. Completely purged all Cursor/VSCode data directories
  5. Launched with custom flags (--no-sandbox, --disable-gpu, etc.)
  6. Used isolated environments with controlled environment variables
  7. Extracted the AppImage and ran the binary directly

The Absurd Reality

It’s 2025, and somehow an Electron-based text editor still can’t reliably manage a pseudo-terminal on Linux. While VS Code handles this with ease, Cursor—based on the same codebase—somehow manages to fall over spectacularly when faced with the complex task of… running bash.

Perhaps the ptyHost is taking scheduled 6-second breaks to contemplate its existence? Maybe it’s actually working perfectly, and those “heartbeat” messages are just its way of saying “I’m still here, just choosing not to respond”?

Impact

This issue makes Cursor practically unusable for Linux developers who (shockingly) occasionally need a working terminal. The irony of an AI-powered development tool that can’t maintain basic terminal functionality isn’t lost on me.

help.

3 Likes

I downloaded the oldest version of the AppImage. Does not really solve the “no ptyhost heartbeat” bug, but it makes it bearable to work on. As it only happens after 45 minutes or so, not like in the new version, whenever I would like to use the chat or the terminal, it starts.

1 Like

Same here. I tried launching the AppImage with --disable-gpu but to no avail.
I suspect a graphics card issue however. Which card do you have (AMD or NVidia?)
Where did you download an older Version of the AppImage?
The bug is super annoying.

On my archlinux the terminal in chat does not work at all. Just hangs forever. Reported!

No reaction from the devs. The service we deserve for 20 $/mo…

0.48 version. The ptyHost issue has not appeared for 2 hours, and when it does, it doesn’t affect Cursor. I even started it without flags.

1 Like

I have changed my graphics card, from Nvidia to an AMD Radeon RX 6400 (not hi-end, just working). It seems this solved my “pty-host heartbeat” issue.
I followed recommendation of chatgpt after analyzing my setup and chatgpt told me that nvidia proprietary drivers may cause the electron issues.

I still have seen one “No ptyHost heartbeat after 6 seconds” in the last 20mins but it seems to be reduced.

UPDATE: It seems I was too quick to rejoice. Same issue as before. But at least we’ve ruled out another possible source of error.

1 Like

Is it still unbearable?

Well, I’m still experimenting. It’s irregular; sometimes I can work for 30mins without being molested, then it kills me literally.
I’m currently trying a 100% fresh install (all .cursor config backupped, .config/Cursor backupped, no extensions … actually I don’t need all that stuff) and currently it works, but I’ve seen that message of death again lurking in the logs … I’ll report

I had the same error on MacOS ARM versions 0.43.0 and on, and just today miraculously discovered something that worked for me.[1] Simply locate the file ptyHostMain.js in the application bundle and add the following line to the top:

process.on('SIGTERM', () => {});

For me, this was: /Applications/Cursor.app/Contents/Resources/app/out/vs/platform/terminal/node/ptyHostMain.js. In my case, analyzing Cursor’s logs revealed that the ptyHost process kept getting killed with code 15 (SIGTERM).


  1. Suggested by 4o after hours of fruitless debugging with o3! ↩︎

I tried this but didn’t work for me - I replaced () => {} with
(it) => {console.log(it); } to see if there’s something happening, but obviously this function never got called.
Any ideas? Do you have confirmation that this function is actually called?

What do you get when you run cursor from CLI with verbose logging?

LOG_LEVEL=trace \
ELECTRON_ENABLE_STACK_DUMPING=1 \
VSCODE_SKIP_RESOLVING_SHELL_ENV=1 /Applications/Cursor.app/Contents/MacOS/Cursor --log trace --verbose --disable-extensions  --no-sandbox --disable-gpu

(you’ll have to adjust the path to Cursor)

When I did that, I was told that my ptyHost was dying with exit code 15 (SIGTERM) – that’s why my code above is the way it is. You and I could potentially have different errors.