Feature request for product/service
Cursor IDE
Describe the request
In a multi-root .code-workspace, every new agent chat is rooted in the first folder. There is no way to pick which repo a chat starts in. working_directory on the Shell tool is a separate, already-tracked bug (158937); even if that is fixed, the session default would still be folder #1 unless the user reorders the workspace file or opens a single-folder window.
Please add an explicit agent working root for each chat:
- A picker when starting a chat in a multi-root workspace (“Work in: rocci | okmate | rocci-app | …”), defaulting to the focused file’s folder or the last used root — not silently folder #1.
- Surface that root in the chat header / context (“Workspace path”) so the user can see and change it mid-session.
- Use that root as the sandbox default cwd for Shell, git, and related tools. Sibling roots stay readable (and writable, per existing approvals); they just are not the default
pwd. - Agents Window: the same “select cwd” folder picker the Editor Window already shows for new terminals (171084). Colin noted
terminal.integrated.cwdis ignored there.
CLI already has this split: --workspace is primary, --add-dir adds extra roots (170291). The IDE should expose the same idea in the UI.
Why it matters
Multi-root is the normal setup for sibling products (language repo + app + docs + desktop host). Folder order is an explorer convenience, not a statement of “this chat is about repo A.” Today:
- Agents run
git status/git login the wrong repo and treat the output as truth. - Users burn a turn (or a whole session) on “wait, that was the sibling.”
- Workarounds (reorder folders, one window per repo, prefix every command with
cd /abs &&) either fight the workspace or only help after the agent already guessed wrong.
Related but different: Git Graph also keys off the first folder (163262). A per-chat working root would not fix Graph; it would stop agents from inheriting that same first-folder default.
Suggested UX (minimal)
- New chat in multi-root: optional “Working root” dropdown (required only if you want to force the choice; auto-detect from focused editor /
@folderis enough). - Command Palette: Cursor: Set Agent Working Root…
- Persist last choice per workspace, not globally.
Does this stop you from using Cursor
No — but every multi-root session starts with a silent 50/50 chance the agent is in the wrong git repo.