Describe the Bug
Problem Description
When using Cursor’s terminal execution tool (run_terminal_cmd
), certain CLI commands are not executing properly and instead produce unexpected output with pipe-related errors.
Expected Behavior
CLI commands should execute normally and return their expected output.
Actual Behavior
Commands appear to be duplicated in the output and produce spurious errors related to head
and pipe operations.
Example
Command executed:
aws ecr list-images --repository-name my-repo --region us-east-1 --output table
Expected output:
---------------------------------
| ListImages |
+-------------------------------+
| ... normal AWS CLI output ... |
Actual output:
$ aws ecr list-images --repository-name my-repo --region us-east-1 --output table aws ecr list-images --repository-name my-repo --region us-east-1 --output table
head: |: No such file or directory
head: cat: No such file or directory
Analysis
- The command appears to be duplicated in the terminal output
- Mysterious
head: |: No such file or directory
errors appear - The actual AWS command doesn’t seem to execute or return results
- This suggests there may be an issue with how shell pipes (
|
) or command parsing is being handled
Impact
- AWS CLI commands fail to execute properly
- Makes it difficult to interact with cloud services via terminal
- Could affect other CLI tools that use similar output formatting or piping
Environment
- Cursor AI IDE
- Using the built-in terminal execution tool
- macOS environment (zsh shell)
- AWS CLI v2 installed and working in regular terminal
Workaround
Commands work normally when executed directly in a standard terminal outside of Cursor’s execution tool.
Additional Notes
This appears to be specific to certain CLI commands, particularly those that might use table formatting or complex output. Simple commands like echo
or ls
seem to work correctly.
This issue seems to be related to how Cursor’s terminal tool handles command execution, particularly with commands that might use pipes, table formatting, or complex output redirection internally.
Steps to Reproduce
Run any AWS CLI commands on an integrated terminal
Expected Behavior
AWS CLI commands should execute normally and return their expected output.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.2.4 (Universal)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:55:16.443Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Additional Information
This was also reported here a while ago
Does this stop you from using Cursor
No - Cursor works, but with this issue