When the agent runs a terminal command (e.g. echo test), the command appears to run (agent sees exit code 0) but no output is shown in the terminal. The terminal stays empty. The agent also does not receive the command output (sees empty string). This makes it impossible to use the agent for any terminal-based workflow (tests, dev server, scripts, etc.).
Steps to Reproduce
Open Cursor and start an agent chat.
Ask the agent to run: echo test
Approve the command if prompted.
Observe: terminal shows no output; agent reports empty output and 0 ms execution time.
Expected Behavior
Terminal should display test (or whatever the command prints). Agent should receive and display the command output.
Hey, thanks for the report. This pattern, empty output, 0 ms, exit code 0, is something we’ve seen before.
The most common cause is a stale working directory. If the folder the agent is referencing was moved, renamed, or deleted at some point, the terminal tool can fail silently instead of showing an error. It can return fake results, empty output, 0 ms, exit 0, with no hint about what went wrong.
A couple of things to check:
Was this project folder ever moved or renamed? Even if it exists now, the workspace state might still reference an old path. Try closing the workspace completely, then reopening it from the correct path via File > Open Folder.
Check DevTools for clues: go to Help > Toggle Developer Tools > Console, then run a command via the agent. Look for errors like ENOENT or anything path-related.
If the above doesn’t help, try telling the agent directly what directory to use: “My project is at /path/to/project, use that as the working directory.”
A couple of related threads where this was the fix:
So I have nuked my workspace, downloaded everything fresh, opened the file via File→Open Folder and then File→Add folder to Workspace. I have then opened a new agent window, opened a terminal window, told the agent what my working directory is, asked the agent to run “echo test” in the terminal.
The agent is now seeing the output which is an improvement from earlier, but I cannot.
I will use cursor today and let you know how it goes, thank you.
Hey, thanks for the report. This is a known issue. We’ve seen it from several users.
The most common cause is the agent silently using a working directory that no longer exists, for example if the project folder was moved or renamed. When that happens, it can fail with empty output, 0 ms, exit 0, and no error message. Two other users with the exact same symptoms traced it to this:
Did you recently move, rename, or delete the project folder? If yes, fully close Cursor, then reopen it from the current folder location (File > Open Folder).
Open Developer Tools (Help > Toggle Developer Tools) and run echo test via the agent. Check the Console tab for errors, especially anything about a path being undefined or a directory not found.
Open a completely new folder, even a temp one, in a fresh Cursor window and test if the agent terminal works there.
If a stale directory isn’t the cause, please share the DevTools Console output after running a command through the agent. That’ll help narrow it down.