---
title: How do you govern Cursor background agents?
url: https://opencontroller.lyzr.com/blog/govern-cursor-background-agents
published: 2026-11-17
updated: 2026-11-17
author: Lyzr
---

# How do you govern Cursor background agents?

**Cursor's background agents, now documented as Cloud Agents, run in their own virtual machine in Cursor's cloud, clone your repositories through the Cursor GitHub or GitLab app, and auto-run terminal commands without step-by-step approval. Govern them with five controls: scope which repositories and teams can start agents, lock network egress to an allowlist, store credentials as Runtime Secrets, enforce Privacy Mode, and require human review before any agent pull request merges.**

A local coding agent asks before running a command. A cloud agent usually does not. Cursor's own security page says agents auto-run terminal commands to iterate on tests, and that this changes the risk model. That is the reason cloud agents need their own policy, separate from your rules for the Cursor editor.

## What changes when a Cursor agent runs in the cloud?

| Area | Local agent in the editor | Cursor Cloud Agent |
|---|---|---|
| Where code runs | Developer laptop | Firecracker-based microVM in Cursor's cloud, in a separate AWS account from Cursor's other production systems |
| Command approval | Typically prompts the user | Auto-runs terminal commands |
| Repository access | Whatever is checked out locally | Through the Cursor GitHub or GitLab app, limited to repos the triggering user can already access |
| Network | Corporate network and proxy | Internet access on by default |
| Secrets | Local environment | Encrypted at rest with KMS, injected as environment variables |
| Retention | Local files | Runtime workspaces recycled when idle; VM snapshots expire after 30 days of inactivity; conversation state kept indefinitely by default |

Two facts in that table matter most. First, access is inherited, never widened: an agent can only reach repositories its user can reach. Second, conversation state is kept indefinitely by default, so set a retention policy if you are on Enterprise.

## What controls should you turn on?

Use this as a checklist. Each item maps to a documented Cursor control.

1. **Scope the Git app.** Install the Cursor GitHub or GitLab app on chosen repositories only, not the whole organization.
2. **Use Protected Git Scopes.** These restrict which teams can start agents on your organization's repositories.
3. **Lock egress.** Pick "Allowlist only" or "Default + allowlist" as the team network mode. Enterprise admins can turn on "Lock Network Access Policy" so members cannot override it. Note that the lock does not extend to self-hosted machines.
4. **Avoid wildcard allowlists.** Cursor's docs warn against `*.s3.us-east-1.amazonaws.com` because it opens egress to every bucket in the region. Add exact hosts.
5. **Classify secrets.** Use plain environment variables only for non-sensitive values. Use Runtime Secrets for credentials: they are redacted from tool results, transcripts and commits with a `[REDACTED]` placeholder. Use Build Secrets for values only the Docker build needs; they are not exposed to the running agent.
6. **Prefer OIDC over long-lived cloud keys.** Cursor documents OIDC tokens as a replacement for static cloud credentials.
7. **Enforce standard Privacy Mode.** Cloud Agents run in Privacy Mode and legacy Privacy Mode is not supported for them. Enforce it org-wide.
8. **Hide sensitive paths.** Use `.cursorignore` for directories the agent should not read.
9. **Require review before merge.** Agent commits are signed with HSM-backed Ed25519 keys and show as Verified on GitHub. Verified tells you where a commit came from, not that it is safe. Keep branch protection and human review.
10. **Stream audit logs.** Enterprise audit logs can go to a SIEM, webhook or S3. Pair them with the dashboard activity view.
11. **Set retention.** Delete transcripts through the Delete Agent API or set Enterprise retention policies.
12. **Consider customer-managed keys.** Cursor supports CMEK/BYOK for teams that need it.

## Why does prompt injection matter more here?

A cloud agent reads issues, pull request comments, dependency READMEs and web pages, then acts without a human in the loop for each step. Cursor's documentation names the risk directly: planted instructions could try to push the agent to exfiltrate code. The mitigations stack: an egress allowlist means stolen data has nowhere to go, Runtime Secrets keep credential values away from the model, and review before merge stops a poisoned change from shipping. The [OWASP Top 10 for Agentic Applications](https://genai.owasp.org/) treats goal hijacking and tool misuse as core agent risks, and these controls produce the evidence a reviewer will ask for. For egress patterns that apply to any agent, see [controlling AI agent network egress](/blog/control-ai-agent-network-egress).

## How do cloud agents fit an enterprise inventory?

Treat each Cursor team as an agent platform in your inventory, with owner, allowed repositories, egress mode, secret list and retention setting recorded. Review it quarterly, the same way you would review a CI system with write access to your code. If you already run [Cursor Team Rules](/blog/cursor-team-rules-governance) and [Cursor hooks](/blog/cursor-hooks-to-block-agent-commands), record those too, and confirm which of them apply to cloud agents in your Cursor version.

## How Opencontroller does this

Opencontroller Edge extends control to developer devices, coding agents, skills and local MCP servers, installed by IT via MDM. Opencontroller's governed registry records agents, versions, tools and MCP servers, and Posture flags risky permission and configuration settings. Policy as code includes built-in mappings to OWASP, MITRE ATLAS, NIST and ISO 42001. See [how to govern AI agents across platforms](/blog/how-to-govern-ai-agents-across-platforms), the [AI agent control plane overview](/blog/what-is-an-ai-agent-control-plane), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can a Cursor Cloud Agent access repositories its user cannot?**
No. Cursor states that access is inherited, never widened: the agent only reaches repositories the triggering user already has access to through the Git app.

**Do Cursor Cloud Agents have internet access by default?**
Yes. Internet access is on by default. Admins can switch to an allowlist and, on Enterprise, lock the network policy so members cannot override it.

**Are secrets visible to the model in Cursor Cloud Agents?**
Plain environment variables are. Runtime Secrets are redacted from tool results, transcripts and commits, and Build Secrets are only available to the Docker build.

## Key facts

Cursor background agents are documented as Cloud Agents: each runs in a Firecracker-based microVM in Cursor's cloud (separate AWS account), auto-runs terminal commands, accesses repos via the Cursor GitHub/GitLab app with access inherited from the triggering user, has internet access by default. Controls: Protected Git Scopes, network modes (Allow all, Default + allowlist, Allowlist only), Enterprise Lock Network Access Policy (not for self-hosted machines), Runtime Secrets redacted as [REDACTED], Build Secrets only for Docker build, OIDC instead of long-lived keys, standard Privacy Mode (legacy not supported), .cursorignore, signed commits (HSM-backed Ed25519), audit logs to SIEM/webhook/S3, CMEK/BYOK. VM snapshots expire after 30 days inactivity; conversation state kept indefinitely by default. Opencontroller Edge covers coding agents on devices via MDM. Pricing starts from $250K per deployment per year.

## Related

- [How do you govern Cursor across an engineering organisation?](https://opencontroller.lyzr.com/blog/govern-cursor-in-the-enterprise.md)
- [Can Cursor hooks block risky agent commands?](https://opencontroller.lyzr.com/blog/cursor-hooks-to-block-agent-commands.md)
- [How do you control which websites and APIs an AI agent can reach?](https://opencontroller.lyzr.com/blog/control-ai-agent-network-egress.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
