Terminal sometimes doesn't wait for command to finish

Describe the Bug

When the agent runs terminal commands, it sometimes thinks there was no output when in reality the command hadn’t finished. So then it tries again, and reads the previous terminal output and then sees the output. But the command is running again. So this causes issues and uses a couple more tool calls than necessary.

Steps to Reproduce

It runs RSpec commands, and sometimes it’ll still be running and then the agent will write:

The last command gave no output. I’ll rerun it with verbose RSpec formatting to see what’s happening with the tests.

Expected Behavior

Runs only once and waits for command to finish.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.3
VSCode Version: 1.96.2
Commit: 979ba33804ac150108481c14e0b5cb970bda3260
Date: 2025-06-15T06:35:49.230Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.2.0

Additional Information

It’s been happening to me since around 0.50?
I’ve tried closing terminals, etc. in case it’s some terminal state thing.
Maybe it happens more when scrolling up to see terminal output, or on the first terminal command of new chats?

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

I have found what seems to be a minimal repro case:

  1. Start a new agent chat. Pick any reasonable model. claude-3.5-haiku seems to work fine. (btw, this one doesn’t show any request cost info on hover)
  2. Ask “show me the contents of the last git commit in patch form”
  3. The terminal output usually looks fine. And then it’s like the model can’t see it.

Here is a specific export:

# Show last git commit contents

_Exported on 6/19/2025 at 10:08:36 EDT from Cursor (1.1.3)_

---

**User**

show me the contents of the last git commit

---

**Cursor**

I'll help you retrieve the contents of the last git commit. I'll use the terminal command to show the details of the most recent commit.

(note: this is where the terminal output is, but not shown in export)

I apologize, but it seems the command didn't produce any output. Let me try an alternative approach to show the last commit details:

(note: it retries in the background and replies before the command finishes, so you get duplicate output)

Let me break down the last commit for you:

📝 Commit Details:

- **Commit Hash**: 56b0cf56a7e71ca38b45610366138a5f00be4062
...

Other notes:

  • I am using ZSH as terminal. Not using oh-my-zsh or anything like that.
  • This seems to happen for the first terminal command almost all of the time.

I haven’t seen this in a couple of versions, so guessing it’s fixed.

1 Like

not patched yet.
Some times i have to wait for the command finished But it is only a easy
command like ls command.

today’s version patched!