Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
Summary
The run_terminal_cmd tool stops returning any stdout/stderr output mid-session. Commands appear to execute successfully (shell exits cleanly, files may be created), but zero output is captured and returned to the agent.
Symptoms
- No output from any command - Even the simplest commands (
echo "hello",pwd,date) return empty output - Commands appear to execute - Exit codes are not shown, but the shell prompt indicates the command completed
- Persistent across all command types - Affects simple commands, complex builds, piped commands, redirections
- Session started working, then broke - Earlier in the same session, terminal commands worked correctly and returned full output
Steps to Reproduce
- Open a workspace with a C project
- Use the agent to run several terminal commands (e.g.,
make,ls, etc.) - initially these work - Continue using the agent for an extended session with many terminal commands
- At some point, all terminal commands start returning empty output - the “Command output:” section is blank, followed by “The previous shell command ended, so on the next invocation of this tool, you will be reusing the shell.”
Diagnostic Tests Performed
Test 1: Simple echo command
Command: echo "Terminal test" && pwd && date
Result: Empty output
Test 2: With full permissions
Command (with required_permissions: [“all”]): echo "hello"
Result: Empty output
Test 3: Redirect to file in /tmp
Command: make -B xxxx > /tmp/foo.log 2>&1
Result: Command completed, but file could not be read back (file not found in workspace)
Test 4: Redirect to file in workspace
Command: cd /Users/foo/bar/ && make -B xxx > build.log 2>&1
Result: Command completed, but build.log could not be read with read_file tool
Test 5: Touch a file
Command: touch /Users/art/foo/bar/build.log
Result: Empty output, file not visible to read_file tool
Test 6: Direct file creation
Command: echo hi > /tmp/foo_testfile
Result: Empty output, file not readable
What Still Works
list_dirtool - correctly lists directory contentsread_filetool - can read pre-existing filesgreptool - returns search results correctlysearch_replace/writetools - file edits are applied successfully- User can run same commands manually in their terminal and see output
What Does NOT Work
run_terminal_cmd- no stdout/stderr captured for ANY command- Files created by terminal commands are not visible to
read_file
Timeline
- Working: Commands like
make 2>&1 | head -80returned full compiler output - Broken: At some point during extended use, output stopped appearing
- No clear trigger: No specific action appears to have caused the break
Impact
This completely blocks the agent from:
- Seeing build errors/warnings
- Debugging compilation issues
- Verifying command success
- Reading command output of any kind
Workaround
User must manually run commands and paste output into chat.
Additional Notes
- The session involved many terminal commands over an extended period
- Multiple workspaces are open:
/Users/art/foo/barand/Users/art/foo/baz - The terminals folder path shown in system info:
/Users/art/.cursor/projects/Users-art-Library-Application-Support-Cursor-Workspaces-1767549399189-workspace-json/terminals - When checked, the terminals folder did not exist: “Error calling tool: Directory … does not exist or it’s not a directory”
Suggested Investigation Areas
- Terminal output buffer overflow or size limit?
- Terminals folder cleanup/deletion during session?
- Pipe/PTY connection lost between agent and terminal?
- Session state corruption after extended use?
- Race condition in terminal output capture?
To Cursor Team: This is a critical issue that completely breaks the agent’s ability to assist with build/compile tasks. The agent cannot see any command output, making iterative debugging impossible.
Steps to Reproduce
Open a workspace with a C project
Use the agent to run several terminal commands (e.g., make, ls, etc.) - initially these work
Continue using the agent for an extended session with many terminal commands
At some point, all terminal commands start returning empty output - the “Command output:” section is blank, followed by “The previous shell command ended, so on the next invocation of this tool, you will be reusing the shell.”
Expected Behavior
things would work
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.2.43
VSCode Version: 1.105.1
Commit: 32cfbe848b35d9eb320980195985450f244b3030
Date: 2025-12-19T06:06:44.644Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0
For AI issues: which model did you use?
all agents are experiencing the problem
Does this stop you from using Cursor
Yes - Cursor is unusable


