[Bug] Command Hangs Indefinitely in Cursor

[Bug] Rails Test Command Hangs Indefinitely in Cursor

Summary:
When running a Rails system test via the integrated terminal in Cursor, the test command never completes and must be manually skipped. This occurs consistently and appears to be specific to Cursor, as the same command works as expected in a regular terminal.

This also stops me from using cursor effectively because I want the agent to iterate on several test runs.


Steps to Reproduce:

  1. Open a Rails project in Cursor.
  2. Run the following command in the integrated terminal or test runner:
    bin/rails test test/some_test.rb
    
  3. Observe that the command starts, but never finishes, even after the test output appears complete.

Expected Behavior:
The test command should run to completion and exit automatically, just as it does in a standard terminal.

Actual Behavior:
The command hangs indefinitely in Cursor. The only way to proceed is to manually skip or terminate the process.


Environment:

  • Cursor version: 1.0
  • OS: Ubuntu 24.04.2 LTS

Additional Notes:

  • The issue does not occur when running the same command in a standalone terminal outside Cursor.
  • Disabling parallel testing and stopping Spring (spring stop) does not resolve the issue.
  • The problem persists regardless of test output options (e.g., with or without --no-color, or piping output to cat).
  • No breakpoints (e.g., binding.pry, byebug) are set in the test.

Workarounds Tried:

  • Running the command outside Cursor (works as expected).
  • Adjusting test output options.
  • Piping the command with cat or similar versions.

Request:
Please investigate why Rails system tests hang indefinitely in Cursor, and advise on any possible fixes or workarounds. Happy to provide more details or logs if needed.

I verified that this happens to all sorts of commands and I wanted to add that I use zsh as shell.

I tried switching to bash for the agentic mode, but I cannot find any setting for it. Even changing my global terminal with chsh -s bin/bash has no effect.

Now I found out that this coming from the powerlevel10k theme! I saw an error from it when the agent started the shell. After disabling it everything was resolved. Strangely it was working in previous versions of Cursor.

It would be really nice to configure the agent shell, such that I can continue to use the theme in my personal terminal or just support the themes again.

Just for reference, someone found a better fix her: Cursor agent mode - when running terminal commands often hangs up the terminal, requiring a click to pop it out in order to continue commands - #16 by jomis