Fan a large task out across parallel Cursor cloud agents via the Cursor SDK. Planners publish tasks, workers hand off back up, and a script reconciles the tree from disk and git, so the spawn / wait / handoff loop keeps converging without long-running agent state.
The skill itself lives in skills/orchestrate/SKILL.md. Read that for the full operating manual; this README only covers what to set up before you invoke it.
bunon PATH.- A Cursor API key in
CURSOR_API_KEY. - Optional Slack app and bot token if you want a Slack thread mirroring the run.
- Open https://cursor.com/dashboard/integrations.
- Create a personal user API key. The value starts with
cursor_. - Export it:
export CURSOR_API_KEY="cursor_...".
Team service-account keys (Team Settings → Service accounts) also work for both local and cloud runs. See the cursor-sdk plugin for the full auth model.
Slack visibility is opt-in. When the token is unset, the script logs once and runs without Slack; correctness does not change. To enable it:
-
Create a Slack app at https://api.slack.com/apps → From scratch. Pick a name and a workspace.
-
Under OAuth & Permissions → Bot Token Scopes, add:
Scope Why chat:writePost and edit messages. chat:write.customizeSet the bot username and icon on each post. chat:write.publicPost in public channels without inviting the bot first. files:writeUpload handoff artifacts to the run thread. files:readPaired with files:writefor the upload v2 flow.reactions:readWatch the Andon :rotating_light:reaction on the kickoff message.channels:historyRead thread replies. Use groups:historyinstead if your run channel is private.Optional but recommended:
Scope Why users:read.emailResolve the dispatcher's first name from git config user.email. Without it, pass--dispatcher-nameexplicitly. -
Install to Workspace and copy the Bot User OAuth Token (
xoxb-...). -
Export it:
export SLACK_BOT_TOKEN="xoxb-...". -
Invite the bot to the channel where you want runs to thread (
/invite @your-bot). Public channels withchat:write.publicskip this; private channels require the invite. -
Grab the channel ID. In Slack: right-click the channel → View channel details → bottom of the dialog. Pass it via
--slack-channel <id>onkickoff(or setSLACK_CHANNEL_ID). The first kickoff persists the id on the plan; subplanners and laterruninvocations inherit it.
cd skills/orchestrate/scripts
bun installThe scripts live outside the host repo's package manager workspace on purpose.
bun skills/orchestrate/scripts/cli.ts kickoff "<goal>" \
[--repo <url>] [--ref main] [--model claude-opus-4-7] \
[--slack-channel <id>] [--dispatcher-name "<first name>"]The CLI prints { agentId, runId, status, url }; from there the cloud root planner self-drives. See the skill for run, spawn, respawn, kill, tail, comment, and andon subcommands.
MIT. See LICENSE.