- Cursor vừa thêm multi-root workspaces: một session agent có thể nhắm vào một workspace tái sử dụng gồm nhiều folder/repo — cross-repo change không còn phải nhảy cửa sổ.
TL;DR
Cursor vừa công bố multi-root workspaces cho cross-repo changes: một session agent duy nhất có thể làm việc trên nhiều folder/repo cùng lúc, đóng gói thành một workspace tái sử dụng. Nằm trong Cursor 3.2 (24/04/2026), tiếp nối Cursor 3 ra mắt 02/04/2026 với multi-repo layout và unified agent sidebar.
What's new
Thông báo gốc trên X: We've also added multi-root workspaces for cross-repo changes. A single agent session can now target a reusable workspace made of multiple folders.
- Một session agent = nhiều folder/repo (không phải 1 agent/1 repo như trước).
- Workspace lưu được dạng
.code-workspaceJSON, share qua git, onboarding dev mới trong 1 click. - Agent có visibility xuyên repo: nó đọc được dependency, contract type, call site ở cả hai bên.
- Đi kèm Multitask + Worktrees trong cùng release 3.2 — bộ ba phục vụ đúng workflow polyrepo.
Why it matters
Đa số team SaaS hiện tại không phải monorepo thuần. Frontend một repo, backend một repo, shared-types một repo, infra một repo. Trước đây, khi user kể với agent "thêm trang profile + endpoint tương ứng", agent chỉ thấy một repo. Dev phải copy context tay, mở nhiều cửa sổ, hoặc viết contract file tạm. Multi-root workspaces xoá bước trung gian đó: agent đọc cả hai root, sửa đúng file, submit PR chéo trong cùng một lượt.
Technical facts
Cấu trúc workspace file rất gọn:
{
"folders": [
{ "path": "./api-gateway" },
{ "path": "./user-service" },
{ "path": "./shared-types" }
],
"settings": {
"search.exclude": { "**/node_modules": true, "**/dist": true }
}
}- Mở qua
File > Open Workspace from File. - Full LSP hoạt động xuyên các root — go-to-definition từ frontend nhảy thẳng vào handler backend.
- Diffs và PR review tập trung một view cho tất cả repo.
- Local agent và cloud agent xuất hiện chung sidebar; session kick-off được từ mobile, web, desktop, Slack, GitHub, Linear.
- Workspace có thể commit chung với repo chính (hoặc để trong repo riêng "workspace-configs"), cho phép versioning bộ repo kèm theo từng feature branch.
- Session agent persist trạng thái qua đóng-mở IDE — nối lại được cross-repo context mà không cần re-prompt từ đầu.
Comparison
| Khía cạnh | Cursor trước 3.x | Cursor 3.2 multi-root |
|---|---|---|
| Phạm vi agent | 1 folder | N folder tái sử dụng |
| Cross-repo refactor | Nhảy window + copy tay | Một prompt, agent tự chạm các root |
| Share context nhóm | Mỗi dev setup riêng | Commit .code-workspace |
| LSP xuyên repo | Không | Có |
VS Code từ lâu đã có multi-root workspace hạ tầng, nhưng Copilot Workspace chưa công bố khái niệm "một session agent × nhiều root" tái sử dụng. JetBrains AI Assistant và Zed cũng chưa có tương đương.
Use cases
- Full-stack feature: "Tạo trang profile UI ở client + API endpoint tương ứng ở backend" — agent sửa đúng cả hai repo.
- Microservices: đổi contract ở
shared-types, agent update mọi consumer ở các service repo trong workspace. - Polyrepo làm-như-monorepo: team vẫn giữ repo riêng (CI, phân quyền) nhưng dev có trải nghiệm thống nhất.
- Cross-repo rename: rename endpoint ở backend, agent cập nhật caller bên frontend cùng một PR chain.
- Onboarding: share file workspace qua git, dev mới mở đúng bộ repo liên quan.
- Infrastructure diff review: gom app-repo + infra-repo vào một workspace, agent đọc Terraform config song song code để suggest migration an toàn.
- Library ↔ consumer: sửa internal library và các downstream caller trong cùng một lượt, bớt PR chain chờ merge tuần tự.
Limitations & pricing
- Indexing surface tăng tuyến tính theo số repo — Cursor khuyến nghị dùng
.cursorignoređể loại build artifacts, generated code, test fixtures. - Với 4+ repo lớn, indexing time và memory có thể trở thành ngưỡng chịu đựng.
- Hỗ trợ multi-agent (nhiều agent đồng thời) trên multi-root workspace vẫn đang polish — community forum ghi nhận vài lỗi sau update tháng 3/2026.
- Folder cần có local (hoặc cloud agent pull) — không phải mô hình cloud-only.
- Pricing: đi kèm gói Pro/Business hiện tại, không charge riêng.
What's next
Hướng tiếp theo khá rõ: (1) hoàn thiện multi-agent × multi-root (nhiều agent, mỗi agent một root, chạy song song); (2) giảm indexing overhead; (3) share workspace config qua team settings thay vì commit file. Nếu bạn đang polyrepo và chưa thử, worth it — chỉ cần tạo một .code-workspace cho feature đang làm và giao cho agent.
Nguồn: Cursor blog, Cursor forum, @cursor_ai.
