Skip to content

Add Cursor Cloud Agents integration guide - #233

Open
kylemclaren wants to merge 17 commits into
mainfrom
cursor-cloud-agents-guide
Open

Add Cursor Cloud Agents integration guide#233
kylemclaren wants to merge 17 commits into
mainfrom
cursor-cloud-agents-guide

Conversation

@kylemclaren

@kylemclaren kylemclaren commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an integration guide for running Cursor Self-Hosted Machines on Sprites, plus a sidebar entry under Integrations.

  • A spawn hook for agent worker controller that gives each claimed request its own Sprite, installs the Cursor CLI, and runs the worker as a supervised service with a Tasks heartbeat.
  • Cursor's hibernation flow maps onto Sprite pause/wake instead of snapshot/restore: the controller re-runs the hook with CURSOR_WAKE=1, and the hook restarts the worker in the same Sprite with its workspace intact.
  • Covers pool registration with a reconnect window, repositories (--clone-git-repos vs. cloning in the hook), network egress, cleanup, and troubleshooting.

Testing

  • Both scripts were exercised against the a real org: fresh claim path, wake path on an existing Sprite, wake on a destroyed Sprite, key file removal, task/service cleanup. Test Sprites destroyed afterwards.
  • Not tested: a real Cursor claim end to end, which needs a Cursor Enterprise service-account key.
  • pnpm build and pnpm lint pass.

Documents running Cursor Self-Hosted Machines on Sprites: a spawn hook
for `agent worker controller` that gives each claimed request its own
Sprite, runs the worker as a supervised service with a Tasks heartbeat,
and uses Sprite pause/wake (instead of snapshot/restore) for Cursor's
hibernation flow.

Refs superfly/sprites-ecosystem#100

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment

Name URL
Preview https://pr-233-superfly-sprites-docs.fly.dev

Commit: d2f474c

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Lighthouse Results

URL Performance Accessibility Best Practices SEO
/ 🟢 94 🟢 97 🟢 96 🟢 100
/integrations/cursor-cloud-agents/ 🟢 97 🟢 97 🟢 100 🟢 100

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ Tests success

Ran against: https://pr-233-superfly-sprites-docs.fly.dev

Found while testing a My Machines worker in a Sprite: with legacy privacy
mode on, the worker authenticates and reports running but reconnects to
the bridge endlessly and never appears in Cursor.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
- Enterprise is no longer a prerequisite: the guide starts with a personal
  My Machines worker (any Cursor plan) and treats team pools as the
  optional scale-out section.
- spawn.sh now serves both modes: run it directly with CURSOR_WORKER_NAME
  for a personal machine, or as the controller's --spawn hook. It clones
  CURSOR_REPO_URL on first create. cursor-worker.sh picks --name or --pool
  accordingly. Both paths re-tested against ecosystem-testing.
- New ExpandableCode React island collapses long code blocks behind an
  Expand / Collapse toggle; used for the two scripts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
Sprite and others added 2 commits September 3, 2026 09:21
Code blocks are the same near-black in both modes, so fading to
--sl-color-bg produced a light smear over dark code in light mode.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
spawn.sh installs the Linux desktop packages when --computer-use or
--share-desktop is requested and writes a startxfce4 wrapper that drops
capabilities (bubblewrap refuses to run with them) and runs xfwm4 under
a session bus, since xfce4-session never launches the window manager
here. spawn.sh also restarts an existing service instead of only
starting a stopped one, and cursor-worker.sh no longer self-stops when
the runtime is the one stopping it, which broke restarts.

Verified on a My Machines worker: both displays up, worker registered,
Sprite held active.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
The startxfce4 wrapper only got the window manager up; anything GTK the
agent launched still aborted on its first icon load, because bubblewrap
(used by GTK's image loaders) refuses to run from a process carrying
capabilities. spawn.sh now diverts /usr/bin/bwrap behind a wrapper that
drops capabilities. Full Xfce sessions and sandboxed Chrome verified
rendering on the worker's displays.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
Cursor's shell tool kills the command's process group on return, so a
browser started as a background job dies immediately. spawn.sh now
writes a user-level rule (~/.cursor/rules/sprite-desktop.mdc) telling
the agent to launch GUI apps with setsid -f and screenshot afterwards.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UEkY7WWtGfEue9LQqBtDYa
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
With desktop sharing on, the current Cursor CLI gives the agent shell
the shared display but screenshots the first one, so agents never see
the windows they open. Document the mismatch and default to
--computer-use alone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Chrome's welcome dialog opens instead of a browser window on a fresh
profile; agents miss it and conclude Chrome crashed. Add --no-first-run
to the rule and the First Run marker to the install one-liner.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
CURSOR_INSTALL_CHROME=1 makes spawn.sh install Google Chrome and front
the chrome commands with a wrapper that always detaches and skips the
first-run and crash-restore dialogs, so any launch style an agent uses
produces a browser window that survives the shell tool's process-group
kill.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The guide now walks through the Integrations tab in the Fly.io
dashboard instead of the spawn.sh and cursor-worker.sh scripts, and is
a third of the length. The ExpandableCode component only existed for
those scripts, so it goes too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant