Agent terminal commands fail when workspace path contains apostrophe

Environment:
Version: 2.3.23 (user setup)
VSCode Version: 1.105.1
Commit: 655ee705c6c7b6da1da481d0fdf13191d5e3e980
Date: 2026-01-06T04:26:58.029Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

When my workspace path contains an apostrophe (e.g., C:\Users…\Test’s Work…), all terminal commands executed through the AI agent fail with PowerShell parsing errors.
Even simple commands like python --version fail with errors like:
At C:\Users…\AppData\Local\Temp\ps-script-xxx.ps1:34 char:134+ … FromBase64String(‘’{1}‘’))) …Missing ‘)’ in method call.The string is missing the terminator: ‘.
The error appears to be in Cursor’s internal PowerShell wrapper scripts (ps-script-*.ps1 in Temp), where apostrophes in paths are being double-escaped incorrectly (’‘{1}’').
My default terminal profile is set to Command Prompt, but Cursor still uses PowerShell wrappers internally for AI-executed commands.

Hey, thanks for the report. This is a known issue with handling apostrophes in paths on Windows.

Workaround: rename your project folder and remove the apostrophe from the name (for example, “Test’s Work” → “Tests Work”). After that, the Agent terminal should work.

We’ve reported this bug to the dev team: Terminal Parsing Issues With Apostrophes In Paths

This happens because Cursor uses internal PowerShell wrapper scripts to run Agent commands, and they don’t escape apostrophes in paths correctly.

Hi @deanrie could this be a larger problem beyond just the terminal, affecting everything? See this post in Reddit.