Check the forum: I have searched the forum and did not find an existing report on this behavior.
Bug description:
The Cursor composer and chat are unable to run terminal commands. When attempting to run a command (e.g., usingecho "hi"
), I receive an error indicating that shell integration failed to activate. The terminal displays the following message:
echo "hi"
Process ID (PID): 31164
Command line: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe '-l' '-noexit' '-command' 'try { . "c:\Users\myusername\AppData\Local\Programs\cursor\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1" } catch {}'
Shell integration failed to activate
Reproduction steps:
- Open Cursor on Windows 11.
- Open the integrated terminal (configured to use the “PowerShell Python Env” profile).
- Execute a simple command (e.g.,
write echo "hi" in terminal
). - Observe that instead of executing the command normally, the terminal shows the above error regarding shell integration.
Screenshots/recordings:
Operating system & Cursor version:
- Operating System: Windows 11
- Cursor Version: 0.46.8
Impact:
This issue prevents the use of terminal commands within Cursor’s composer and chat, significantly affecting my workflow.
Additional Configuration Details:
{
"terminal.integrated.defaultProfile.windows": "PowerShell Python Env",
"terminal.integrated.useWslProfiles": false,
"terminal.integrated.profiles.windows": {
"PowerShell Python Env": {
"path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"args": [
"-NoExit",
"-Command",
"& {",
"cd '${workspaceFolder}';",
"if (Test-Path -Path .\\venv) { . .\\venv\\Scripts\\Activate.ps1 }",
"}"
],
"icon": "terminal-powershell"
}
}
}
I’ve tried several tweaks to my terminal settings (both locally and within Cursor) without success. Any assistance in resolving this shell integration issue would be greatly appreciated.