[BUG] Terminal tool gets stuck after exit code

In the latest version 0.46.8, whenever the agent executes a command in the terminal, it gets stuck until manually canceled.

I have tried using Bash, Zsh and Fish, but the issue does not seem to be related to the shell. The command exits successfully, but the agent remains stuck, waiting for the terminal tool to finish.

Version: 0.46.8
VSCode Version: 1.96.2
Commit: be4f0962469499f009005e66867c8402202ff0b0
Date: 2025-02-28T19:31:35.681Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.3.0

6 Likes

This is an extremely annoying issue! @ericzakariasson, @deanrie maybe you can have a look?

If I click on “Pop out terminal” it fixes the issue and the agent continues.

1 Like

Getting the same issue!

1 Like

Weird, it seems that this is not the global issue otherwise it would have gotten more attention. Did you manage to fix it somehow?

Had to downgrade to 0.45.17, terminal works fine there

It looks like in 0.45 cursor waits for a few seconds and then possibly cancels the command itself. In the new version, this behaviour does not work

@deanrie :folded_hands::folded_hands::folded_hands:

1 Like

I’m encountering the same issue. Popping sometime solves it.

Same issue, wasted a few 10s of prompts due to this hanging, many more considering the lost discussions because it cannot execute. @ericzakariasson @danperks could we get some response

A simple command which gets hung up

which has no problem running in actual terminal

feels amazing throwing away $ for no reason

@danperks is fixing this is on the roadmap or I’m stuck on 0.45?

I think the pattern I’ve noticed is that the first time the agent calls the terminal in a conversation, it works fine. Every subsequent terminal use reuses the first terminal, and that leads to this bug.

So to avoid this, I basically always press “pop out terminal” after the first one finishes to ensure that subsequent calls create a fresh one each time → no more bug.

Still very annoying (especially when it does multiple commands in succession and you’re basically trying to snipe the pop out button in like 2 seconds) but I’m also noticing the same bug with other AI IDEs FWIW, so maybe it’s an OS-wide or model issue?

Bump. Is this being addressed at all?

same here. super annoying!

@ericzakariasson :folded_hands::folded_hands::folded_hands:

in my case it looks like it tries to run commands in the wrong terminal?

this results in a blank unkillable terminal:

more details:

I’m also facing the same issue

When i switch default terminal profile to use bash instead of zsh, it works faster - almost instantly

You can change the profile by opening commands palatte and “Terminal Default Profile”

Tried a few other things. When i have some description in the settings it somehow asks me permissions everytime but if I just have allow list like below, it works fine:

another things is p10k is definitely messing with cursor. I have completely remove p10k configuration and now it does not get stuck(like cancel with lading indicator). It just exits immendiately after command is run and controil is back to chat

I’m using fish, but it does not work for me in any shell in 0.46, however it works fine in 0.45

Just tried it one more time with bash and zsh in 0.46.11, no p10k, but it still gets stuck until I manually cancel the terminal command, rolled back to 0.45 again