Card #349 · Cursor (AI IDE)
Shell tool ignores working_directory in multi-root workspaces
When using multi-root workspaces, the Shell tool silently ignores the specified working_directory and executes commands in the first workspace root instead. This leads to destructive actions like writing files to the wrong repository and causes the agent to fail when accessing data in non-primary repos.
Pain score
0.61/ 1.00 · weighted product of four components
Reach0.52distinct authors (log-normalized)
Recency1.00freshness decay, half-life months
Engagement0.87upvotes + comments, normalized
Monetization0.50willingness-to-pay cues in evidence
§ Evidence — 4 verified quotes
The Shell tool’s working_directory parameter is silently ignored in multi-root workspaces. Commands run in the first workspace root instead of the path passed in, with no error returned.
In a Cursor workspace containing multiple Git repositories, the Shell tool’s working_directory parameter does not reliably re-root the command in the target repository.
The tool’s output footer even claims the cwd is the path I specified, but a follow-up pwd in a later Shell call reveals the cwd was actually the first workspace root — and files get written to the wrong repo.
The agent then spends a lot of tokens hunting for something in a repo that can never contain it.
Comments are a Pro feature — join the conversation, share what you've shipped, hear what others are building.
Upgrade to Pro