Cloud agent: how do I deal with a very large repository?

One of the repositories I’m interested to run in cloud agent is huge. It has all the asset files that I’m not interested in, so even fetching a single commit takes several hours. Definitely something that I don’t want to fully clone neither on my local nor on a cloud agent.

The usual setup on my local involves cloning with --sparse and --filter=blob:none, disabling LFS smudge filter and then using git sparse-checkout to checkout directories manually, but I can’t find a way to affect the initialization process including environment.json. Any ideas?

Hey, thanks for the request. Quick answer: as of today, you can’t affect the clone via environment.json. For a Cursor-managed cloud VM, checkout is always a full git clone, and it happens before any custom setup steps. There aren’t any fields for sparse or blobless strategies yet. So for a repo where even fetching a single commit takes hours, the standard cloud flow won’t work right now.

A workable option for your case is My Machines. The idea is that you keep your own checkout with --sparse, --filter=blob:none, LFS smudge disabled, etc. either locally or on a devbox, and run agent worker start from the root of that repo. When starting Cloud Agent, pick that machine. The agent loop still runs in Cursor’s cloud, but tool calls like terminal and file edits run against your sparse checkout, and nothing gets cloned again. It works on Pro, with no inbound ports or firewall changes needed.

Docs: My Machines | Cursor Docs

I’ll pass configurable clone strategies for cloud VMs (sparse or partial) to the team as a feature request, but I can’t promise an ETA. Let me know if anything doesn’t work with My Machines.