November 7, 2026

Cursor Multi Repo: Work Across Repositories in One Workspace

Adding a delivery note to checkout looks like a small change until the frontend, Orders API, and shared types live in separate repositories. The form can accept the new field while the API rejects it, or an overlooked consumer can still depend on the old contract. A Cursor multi-repo setup lets an agent work across the relevant code in one task. Choose a local multi-root workspace or a cloud environment, then make cross-repository compatibility part of the work from the start.

Can Cursor work across multiple repositories?

Yes. Cursor supports local multi-root workspaces, where an agent can use context from several folders. Cloud agents use a separate multi-repo environment containing the selected repositories. Since Cursor 3.2, a single session in the Agents Window can target a reusable multi-folder workspace, including frontend, backend, and shared libraries.

Cursor disables worktrees in multi-root workspaces, and Cloud Agents cannot open a local multi-root workspace. Choose a multi-repo cloud environment for remote execution; use worktrees on a single repository when the goal is isolated work on different branches.

Set up a multi-root workspace in Cursor

Say you're adding an optional delivery note to checkout. Keep the cloned frontend, API, and shared-types repos beside each other, then build a workspace around them:

  1. Open the frontend repository in Cursor.
  2. Choose File > Add Folder to Workspace and add the API and shared-library folders.
  3. Choose File > Save Workspace As and save checkout.code-workspace beside those folders. The workspace file records the roots without combining their Git histories.
  4. Run Open Agents Window from the Command Palette and select the saved workspace for a local agent session. Check the selected workspace before prompting.
  5. Ask the agent to locate the checkout form, request handler, and delivery types, reporting a path in each root before making edits.

A workspace file for that layout looks like this:

{
  "folders": [
    { "name": "frontend", "path": "./frontend" },
    { "name": "orders-api", "path": "./orders-api" },
    { "name": "shared-types", "path": "./shared-types" }
  ]
}

Paths are relative to the workspace file, so adjust them to match where you cloned the repos.

Run cloud agents across multiple repos

Cursor's multi-repo cloud environments, introduced in May 2026, let agents and automations reuse a repository group. Create an environment from the Cloud Agents dashboard, select the repositories, and configure the dependencies and test services together.

To keep the cloud setup in Git, save .cursor/environment.json in one of the selected repos. Point it at your Dockerfile like this:

{
  "build": {
    "dockerfile": "Dockerfile",
    "context": ".."
  }
}

This uses .cursor/Dockerfile. Add your project's installation and startup commands too. In the saved environment, set the environment.json location to the repo containing the file. Saving the file alone doesn't select it. Cursor checks your personal saved environments before team ones. It only falls back to a repo's .cursor/environment.json for single-repo runs.

Builds prepare the default branches and run installation ahead of agent startup. Put long-running services in start or terminals, then verify the actual branches and test commands for the task. Environment secrets can cover the whole repository group. Review each secret's repository scope before starting, and group repositories with compatible access needs.

For recurring work, select the same repository group when configuring an automation. Include the contract to inspect and the checks to run in its prompt.

Multi-repo vs. monorepo in Cursor

Use the repository structure your system already has. If the checkout frontend, API, and shared libraries live in one monorepo, opening the root keeps their build configuration and shared types nearby. Opening only the frontend package is useful for a contained UI change, but check whether the task also needs a schema or generator outside that folder.

Separate repositories fit a multi-root workspace when the change crosses their existing boundaries. Record each branch before starting; matching branch names don't prove the checkouts contain compatible changes.

Use .cursorignore to exclude irrelevant generated files from normal agent file access. Keep the contract definitions visible. Ignore patterns don't block terminal or MCP tools from accessing files, so don't rely on them to protect credentials.

Rules and context across repos

Put repository-specific conventions in .cursor/rules/*.mdc, with file patterns that match the intended paths. Check the active rules when switching roots: alwaysApply: true ignores globs. Nested AGENTS.md files apply to their directory and descendants, combining with parent instructions.

Root-level files need extra care. In an August 2026 staff-confirmed issue, each root's AGENTS.md applied workspace-wide. Nested files stayed scoped. Inspect what loads in your installed version before relying on a root file to carry backend-only commands.

For the checkout change, give the agent a concrete instruction:

Find the checkout form, Orders API request schema, and shared delivery types. Propose an optional delivery-note field and identify affected consumers before editing. Preserve requests that omit it. Run each repository's documented checks and a frontend-to-API request test. Report the branches, changed files, results, and any consumer you couldn't verify.

Keep shared conventions consistent, but let each repository supply its own test commands rather than copying a backend command into every root.

What Cursor still can't see across repos

The selected code can show imports and API calls. It may omit a fulfillment service that consumes order events, or the decision that delivery notes must never appear in analytics. That missing architectural context changes what “finished” means for the checkout task.

We built Catio to bring architecture decisions and system context into coding work. Through our MCP, Cursor can query search_inventory_relationships for dependencies and data flows, then retrieve the design your team reviewed. Connected sources matter: GitHub Source Code contributes architecture from code, while VPC Flow Logs contributes observed relationships. Check coverage and confirm an unexpected consumer with its owner before expanding the change.

To connect the Catio MCP to Cursor, merge this entry into ~/.cursor/mcp.json, preserving any existing servers:

{
  "mcpServers": {
    "catio": {
      "url": "https://mcp.catio.tech/mcp"
    }
  }
}

Reload Cursor, invoke a Catio tool, and select your organization and workspace in the OAuth flow. Ask “Tell me about my Catio session” to check the connection.

For the checkout change, start with an inventory summary, inspect the relationships for Orders, then search for Blueprints about order handling. Use your own service names in these prompts.

Our MCP tools can also create a design or update a blueprint as decisions change. Inventory and workspace context remain read-only through MCP; Cursor handles the code edits.

Limits and troubleshooting

If something isn't working, start with the checks below before adding more repos.

Problem

Likely cause

What to check

Agent only edits one repository

Session targets one folder, or the prompt names only that repo

Select the saved workspace and request a file-location pass across all roots.

A required file is missing from results

Wrong root, path, or ignore pattern

Open the file directly and inspect the workspace folders and ignore configuration.

Rules conflict between roots

Always-applied guidance or root AGENTS.md leakage

Inspect active instructions and narrow repository-specific rules.

Cloud agent cannot reach a private repo

Missing provider-app grant or user access

Have the repository admin check both before rerunning.

Worktree option is unavailable

Multi-root workspace selected

Use a single-repo worktree or a multi-repo cloud environment.

For a private repo, check the provider app's permissions and the permissions of the person starting the agent.

Conclusion

Build your Cursor multi-repo workspace around the change you need to ship. For the checkout example, the form, API, and shared types must agree, requests without the new field must keep working, and affected consumers need explicit checks. Choose the local or cloud setup that fits the job, scope each repository's instructions, and review the contract across the resulting PRs.

Connect Catio to Cursor before your next cross-repository change. Review the dependencies and design decisions relevant to your change, then give Cursor a concrete implementation plan.

Cursor multi-repo FAQ

Can a Cursor agent open pull requests in more than one repo?

Yes. A multi-repo cloud agent can open pull requests in the repositories it changes. Check compatibility across those PRs and specify merge and rollout order separately.

Do Cursor rules apply across all folders in a workspace?

It depends on the rule type and scope. File-scoped project rules differ from always-applied instructions, and root AGENTS.md has the reported multi-root caveat above. Check what is active for the files being edited.

Is there a limit on how many repos one workspace or environment can hold?

The current Cloud Agents API documents up to 500 repositories per environment. The local multi-root documentation doesn't state a numeric cap. Start with the repositories needed to implement and test the task; a larger selection doesn't automatically make its context more useful.

Share this Post

Related posts

No related post.