The built-in terminal in Cursor reports PowerShell script syntax errors when executing any command on Windows 10, causing no commands to run.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Environment Information:Operating System: Windows 10 (Version 10.0.26100)Shell: PowerShell v1.0Working Directory: E:cursor_testonecursor_大报告代码Cursor Version: [Please fill in your version]Steps to Reproduce:1. Open Cursor2. Launch Cursor on a Windows 10 system3. Open any project4. Open a project directory containing Chinese characters in the path (e.g., E:cursor_testonecursor_大报告代码)5. Use the AI assistant to execute any terminal command6. Ask the AI in the chat to execute any simple command, for example: Or:7. Observe the errorObserved Behavior:- Command execution fails, returning Exit code: 1- A large amount of PowerShell syntax error messages are outputTest Command Examples:Actual Result: All commands fail, returning the same PowerShell script syntax errorsExpected Result: Commands should execute normally and return results

Steps to Reproduce

Environment Information:Operating System: Windows 10 (Version 10.0.26100)Shell: PowerShell v1.0Working Directory: E:cursor_testonecursor_大报告代码Cursor Version: [Please fill in your version]Steps to Reproduce:1. Open Cursor2. Launch Cursor on a Windows 10 system3. Open any project4. Open a project directory containing Chinese characters in the path (e.g., E:cursor_testonecursor_大报告代码)5. Use the AI assistant to execute any terminal command6. Ask the AI in the chat to execute any simple command, for example: Or:7. Observe the errorObserved Behavior:- Command execution fails, returning Exit code: 1- A large amount of PowerShell syntax error messages are outputTest Command Examples:Actual Result: All commands fail, returning the same PowerShell script syntax errorsExpected Result: Commands should execute normally and return results

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

版本: 1.7.44 (system setup)
提交: 1.99.3
日期: 9d178a4■■■89981b62546448bb32920a8219a5d0
Electron: 2025-10-10T15:43:37.500Z
ElectronBuildId: 34.5.8
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.1
OS: 13.2.152.41-electron.0

For AI issues: which model did you use?

Claude-4.5

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This looks like a character-encoding issue when the working directory contains non-ASCII characters.

Try this first:

  1. Press Ctrl+Shift+P → “Terminal: Kill All Terminals”
  2. Fully close and restart Cursor
  3. Press Ctrl+Shift+P → “Terminal: Create New Terminal”
  4. Check if AI commands work now

Alternative workaround (if restart doesn’t help):
Add a UTF-8 rule so AI runs terminal commands with UTF-8:

UTF-8 encoding setting when executing a terminal command: whenever a terminal command is executed, $OutputEncoding = [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 first and then run together

How do I add a rule? I tried the first method, it didn’t work, I’m going crazy.:sob:

I have already added the rules, but it still doesn’t work. It’s still garbled, and this error is reported.

I don’t think it’s because of PowerShell, but because every time it opens, it’s the Cursor terminal, not PowerShell.:face_holding_back_tears:

I see that your terminal shows “Cursor” not “PowerShell”, that’s the new terminal tool for Agent.

Try this setup:

  1. Open Cursor Settings Ctrl + Shift + J
  2. On the Chat tab, find “Legacy Terminal Tool”
  3. Enable “Legacy Terminal Tool”
  4. Press Ctrl + Shift + P → “Terminal: Kill All Terminals”
  5. Fully restart Cursor
  6. Open a new terminal and test the AI commands

This should restore the standard PowerShell and correctly apply the encoding settings.

Oh my gosh! Thank you so much! That’s enough!:face_holding_back_tears: :face_holding_back_tears: :face_holding_back_tears:

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.