Running Cursor Cloud Agents in Cloudflare Sandboxes: How Self-Hosted Execution Works and What Stays Under Your Control

Cursor Cloud Agents can now execute in customer-controlled Cloudflare Sandboxes while Cursor keeps the agent loop. How the architecture works, what data still leaves your environment, setup requirements, security tips, and Cloudflare's related AI vulnerability service.

PUBLISHED // UPDATED
DURATION // 06 MIN READ
Developer laptop next to a small server rack in an office, terminal on screen with no readable text, cool overhead light, no logos
FIG.01 // VISUAL DOCUMENTATION Developer laptop next to a small server rack in an office, terminal on screen with no readable text, cool overhead light, no logos

Cloud coding agents are convenient: you assign a task from your editor or phone, and the agent works on a remote machine while you do something else. For many companies, though, the question is where that machine runs and what it can reach. On September 2, 2026, Cloudflare and Cursor announced a way to split the two: Cursor keeps the agent’s “brain” in its own cloud, while the actual commands, file edits and repository operations run inside sandboxes in the customer’s Cloudflare account. This article explains how the setup works, what data still flows to Cursor, what you need to deploy it, and how to secure it.

What was announced

According to Cloudflare’s press release, Cloudflare now supports running Cursor Cloud Agents on Cloudflare Sandboxes, building on similar integrations with Devin Outposts and Claude Managed Agents. Developers keep using Cursor as before (the desktop app, cursor.com or the mobile app), but tool calls such as terminal, filesystem and browser actions run inside customer-controlled sandbox environments.

The feature relies on Cursor’s Self-Hosted Machines capability. Cursor’s announcement describes it as moving only the execution environment, while “the agent loop, inference, and planning remain in the Cursor cloud”. Cloudflare is one of several supported providers, alongside AWS Lambda, Coder, Daytona, E2B, Modal, Namespace and Vercel.

How the architecture works

ComponentRuns whereResponsibility
Agent loop, planning, model inferenceCursor’s cloudDecides what to do next and generates code
Worker (Cursor CLI)Customer’s Cloudflare sandboxExecutes commands, edits files, runs builds and tests
Repositories, build caches, secretsCustomer environmentStay on the customer’s machines during operation

The connection is outbound only. A worker opens a long-lived HTTPS connection to Cursor’s backend, and tool calls arrive over that connection, so Cursor never needs an inbound path into the customer’s network.

Per Cloudflare’s documentation, each Cursor session gets its own Linux sandbox: a container started by a Durable Object for that session. Sessions do not share files or processes. Cloudflare provides an open-source Workers template that deploys the Worker, Durable Object namespace, container application, R2 storage binding and a scheduled trigger used by the integration, as noted in the developer changelog.

For teams, Cursor supports worker pools as named routing targets: new agent chats wait until an available worker claims them, and pool orchestration can start capacity when demand rises and release it when sessions end.

What still leaves your environment

Self-hosted execution does not mean nothing leaves your network. Both companies are explicit:

  • File chunks the model reads during inference are sent to Cursor, because the model runs there.
  • Tool outputs flow back to Cursor and may contain code.
  • Agent transcripts may be processed and stored by Cursor.
  • Artifacts such as screenshots, videos and log references are uploaded so they can appear in pull requests and dashboards.

So the benefit is control over where code executes, what internal systems the agent can reach, and where secrets and caches live. It is not full data isolation. Teams with strict requirements should compare this with fully local agents.

Requirements

Cloudflare’s documentation lists:

  • a Cursor Enterprise plan with self-hosted machines enabled;
  • a Cursor team service-account API key with agent scope;
  • a Cloudflare Workers Paid account with access to Containers and R2;
  • Node.js 20 or later and a running Docker daemon for deployment.

The first scheduled controller run can take up to five minutes to start. Startup times should improve: on September 30, Cloudflare rebuilt its Containers platform for agent sandboxes, saying containers now start about six times faster, with median startup in an independent benchmark falling from just over four seconds to 648 milliseconds, and adding filesystem snapshots in public beta.

Security recommendations

Cloudflare’s documentation notes that each container receives the Cursor service-account key and, if configured, Git and snapshot tokens, and that code running in a session can read these values. That leads to a few practical rules:

  1. Scope Git tokens narrowly, giving access only to the repositories the agents need.
  2. Do not put production secrets in the sandbox. Use separate, limited credentials for test environments.
  3. Restrict outbound network access from sandboxes to the services the agent genuinely needs.
  4. Require pull requests and human review for agent changes, with branch protection on main.
  5. Log and review agent sessions, including which commands ran.

The day after the Cursor announcement, Cloudflare launched Vulnerability Discovery and Remediation, an invitation-only service within Cloudflare Managed Defense that uses OpenAI’s Daybreak models, including GPT-5.6 Cyber, to investigate code customers authorise. It combines code analysis with Cloudflare’s view of which routes are live, how much traffic they carry and whether they are being probed, then proposes code patches and, where the evidence supports it, custom WAF rules.

SiliconANGLE reports that inference runs on OpenAI’s servers via Cloudflare AI Gateway, every proposal must pass checks written outside the model, and no rule or patch takes effect without explicit human approval. Pricing was not disclosed. Together, the two launches show Cloudflare positioning itself as the controlled execution and security layer around AI agents built by others.

When this setup makes sense

  • Agents need access to internal services such as private package registries or staging databases.
  • Policy requires code execution in your own cloud account, even if inference happens elsewhere.
  • You already use Cloudflare for Workers, R2 or Zero Trust networking.
  • You want elastic capacity instead of maintaining a fleet of build machines.

If your main concern is that no code ever reaches a third-party model, this architecture does not solve that, because inference stays in Cursor’s cloud.

For related coverage, see our guides to OpenAI Codex cloud environments, forward deployed engineers in enterprise AI, and Gemini 3.8 Flash.

Our analysis

Splitting the agent’s reasoning from its execution is a sensible compromise for enterprises: developers keep a familiar tool, while platform teams control where commands run, what they can reach and how credentials are scoped. The important caveat is that code and outputs still flow to the agent vendor for inference. Teams that understand that boundary, scope tokens tightly and keep human review on merges can get the convenience of cloud agents with considerably more control than before.