Cursor getting stuck in terminal is very consistent in Windows WSL or PowerShell. The command finished and return to the shell prompt waiting for input but cursor just can’t detect that and sit there. On MacOS it rarely happens.
When it’s stuck, you can always get it unstuck by click on the shell terminal and press enter a few times.
I have the same issue too. I noticed that this does not happen immediately when I start a new chat session. However, after some point (maybe in next terminal command, maybe later) it will start getting stuck. Claude Sonnet 4 noticed this issue by itself ( and checked if there is an issue with running terminal commands by running pwd and this command didn’t finish running.
Yeah, this issue is now worse than ever. The AI can’t seem to figure out how to use the consoles at all for me. It constantly requires babysitting and frequently needs me to press Ctrl+C or manually exit the terminal. By that point, the AI—for some reason—can no longer see the terminal I just pressed Ctrl+C on, forcing it to start all over again and burn through hundreds of tokens repeatedly, often doing who knows what, since the terminal is usually in this tiny, unopenable, compressed view.
I’d say that out of 10 terminal usages, it successfully uses the terminal correctly only 4 times. In the other cases, it abandons the process, leaving my Legion Pro bogged down by 50+ terminals it never closed. And I can’t close them without shutting down the whole app, lol.
Edit to clarify os
This happens on windows, ubuntu 22.04, and ubuntu 25
I still get intermediate hangs but it’s a lot better now, and I don’t get any of the “q command” errors. I feel like when it tries to run a command that requires input (like git diff), after you kill it it’s slower/hangs on other commands, but I have no proof of that yet.
Hi,
I’m using WSL (Arch) with fish, and terminal commands from the agent hang everytime. I tried changing fish’s config files as described above but it doesn’t help the issue. Here are my version details, thanks in advance !