Cursor getting stuck in terminal

I’m on the latest v1.2.2 and it still gets caught up and I still have the q^w^c terminal error that breaks the whole conversation.

2 Likes

Yes, the internal cursor cmd often gets stuck with long commands where the pager is getting triggered.

then I often quite the terminal…

I am experiencing the issue on windows, as do probably everyone else. There are some fixes available for iOS people claim it helped them, but this still remains unresolved on windows…

3 Likes

giving this a whirl, thanks for the suggestion

switching to git bash has improved my workflow dramatically. Highly recommend this as a workaround to anyone.

I have been experiengin the same problem as I mentioned before. I have made the effort to completely describe the problem and also related problems on windows.

How do we tell the agent to use Git Bash?

It’s a crappy workaround, but I’m willing to try anything at this point!

You can change default terminal in the settings.
Also if you have one open, you can click the more options arrow and click “Select default profile”
But you have to have git bash installed.

1 Like

I’ve had this problem myself on and off but rarely enough I didn’t bother trying to fix it. However it’s getting bad now, almost every prompt. Often the easy fix is click on the terminal window and press Enter. The moment it sees the shell prompt a 2nd time, it realizes the command is finished.

I’m on Windows, using Powershell as my terminal. As some point I changed Cursor to use a newer (7.5.1) version of Powershell, I think because the older version didn’t have a feature Cursor often tried to use (perhaps pipes or && to execute multiple commands).

Per a comment above, I’ll try changing to the git bash shell instead to see if that will fix it for good.

I did notice just now that Terminal → Integrated → Default Profile: Windows is set to “null” which it says is the default, instead of one of the PowerShell choices.

1 Like

I see this mostly in PowerShell commands. I’ve instructed Cursor to use cmd to run terminal commands and that seems to help, but Cursor forgets that often.

I tried switching to git bash, still having the same issue, only now i hitting enter doesn’t do anything either :worried:

Hi everyone here, the issue is being worked on by Cursor Team.

I think we also have a few duplicate posts on this so the efforts on communicating this properly becomes a bit more tricky.

here are similar cases

4 Likes

I have exactly the same problem.
If I [skip] then that almost always cancels the prompt.
If I [move to background] that mostly recovers & continues.

Press Enter in the Agent terminal if everything went as it should, or Cancel if Enter does not work or the process inside the terminal clearly freezes without ending - this way you will give the correct context for the Agent.

@condor I suggest to provide a link to that recommendation if new duplicates appear.

1 Like

Sure, the goal is to do that, though not yet automated.

1 Like

I have installed the micrososft cli terminal mcp… it doesnt get stuck as much as cursors terminal does.

You can also create an md file with most important syntax rules when running terminal commands and attach it to prompts. That way the model gets forced to read it and apply it.

Normal memories wont help most of the time, since they wont be read when the model is shooting for quick fixes and in the flow…

1 Like

Hello everyone, I believe this issue has likely been fixed in version 1.3, which will be released soon. However, let us know if this is not the case.

1 Like

I am using windows cli mcp, it doesnt get stuck so often. I also use an md file i Have created with every prompt, so the agent /model doenst make the same mistakes again, because memoreis wont get read when it shoots for quick fixes or is in the flow. but md files in prompts WILL get noticed! This is the big trick I learned the last month while testing.

Md file:

:robot: AGENT QUICK RULES – UNIVERSAL RULES
Only universal terminal/syntax rules for any prompt – specific workflows have separate files

:high_voltage: EMERGENCY FIXES
bash
copy
edit

Terminal is frozen

taskkill /F /IM python.exe

Git pager freeze (black “END” terminal)

git --no-pager log --oneline -3

ModuleNotFoundError in scripts/

import sys, os
sys.path.append(os.path.join(os.path.dirname(file), ‘..’, ‘..’))
:desktop_computer: TERMINAL SYNTAX
bash
Kopieren
Bearbeiten

:cross_mark: NEVER – PowerShell && chaining doesn’t work

cd “path” && python script.py

:white_check_mark: ALWAYS – Use Microsoft CLI MCP directly

python script.py # with workingDir parameter

:cross_mark: NEVER – Wildcards freeze the terminal

ls *.xlsx | dir *.py | Get-ChildItem *

:white_check_mark: ALWAYS – Use specific filenames

ls specific_file.xlsx
:wrench: TOOL CHOICE
Microsoft CLI MCP: For scripts <30s, status checks, debugging

Cursor Terminal: For scripts >30s, use run_safe.py for risky commands

workingDir: Microsoft CLI MCP starts in C:/Users/L490 → use workingDir param

:snake: PYTHON ENCODING
python
Kopieren
Bearbeiten

:cross_mark: NEVER – UnicodeDecodeError on German Windows systems

subprocess.run(cmd, shell=True, capture_output=True, text=True)

:white_check_mark: ALWAYS – Unicode-safe

subprocess.run(cmd, shell=True, capture_output=True, text=True,
encoding=‘utf-8’, errors=‘ignore’)
:prohibited: UNICODE PREVENTION (PROACTIVE)
python
Kopieren
Bearbeiten

:cross_mark: NEVER – Emojis crash PowerShell

print(“:white_check_mark: Import successful! :tada:”)
print(f":bar_chart: {count} new drivers imported")

:white_check_mark: ALWAYS – ASCII-only output for agent scripts

print(“[SUCCESS] Import successful!”)
print(f"[STATS] {count} new drivers imported")

:cross_mark: NEVER – Unicode in script output

status_icons = {“success”: “:white_check_mark:”, “error”: “:cross_mark:”, “info”: “:bar_chart:”}

:white_check_mark: ALWAYS – ASCII status markers

status_markers = {“success”: “[OK]”, “error”: “[ERROR]”, “info”: “[INFO]”}
AGENT SCRIPT STANDARDS:

Agent scripts: ASCII-only output

Human-only scripts: Emojis allowed (use run_safe.py)

New scripts: Always test Unicode output via Microsoft CLI MCP before commit

:brain: COMPLEX PROBLEMS
For complex issues, always run the sequential thinking MCP before making changes.

:clipboard: DOCUMENT RULE
:warning: ONLY UNIVERSAL TERMINAL/SYNTAX RULES – no specific feature notes!
:locked: CHANGES: Add new content only after user approval.

:file_folder: SCRIPT MANAGEMENT
:white_check_mark: Always load the script overview before any coding task (prevents duplicates)

:white_check_mark: Move one-time scripts to archive/legacy/ after success

:magnifying_glass_tilted_left: WEB SEARCH CHOICE
Tavily: Quick tech facts, API syntax, specific metrics (<3min research)

Cursor WebSearch: Problem-solving, current 2025 practices, full guides

:hammer_and_wrench: TOOL DEVELOPMENT
MCP Tool: For agents used frequently (>5x/week), performance-critical

Python Script: For one-time or rare use, human-triggered

:globe_with_meridians: RENDER DEPLOYMENT (CRITICAL)
:cross_mark: Manual scripts (e.g., check_render_db.py)

:white_check_mark: Render CLI MCP (direct service access, logs)

:police_car_light: AFTER GIT PUSH: End the chat! User must verify deployment manually

:hourglass_not_done: DEPLOYMENT TIME: 2–3 minutes – NEVER test immediately

:counterclockwise_arrows_button: PATTERN: Push → End chat → User tests → New chat if issues arise

:prohibited: UNIVERSAL DON’TS
:cross_mark: PowerShell && command chaining

:cross_mark: Deleting files without user permission

:cross_mark: Scripts from subfolders without sys.path.append

:cross_mark: subprocess without encoding=‘utf-8’, errors=‘ignore’

:white_check_mark: UNIVERSAL DO’S
:white_check_mark: Use Microsoft CLI MCP for short commands

:white_check_mark: Use sys.path.append() in scripts/ subfolders

:white_check_mark: Use Unicode-safe subprocess on German Windows

:white_check_mark: Use sequential thinking for complex problems

:light_bulb: Always follow these universal rules for any prompt