Skip to content

Commit 02f0a75

Browse files
committed
Merge remote-tracking branch 'origin/main' into disable-cursor-temporarily
2 parents ac72c4d + e44705d commit 02f0a75

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

packages/cli/src/shared/orchestrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ async function postInstall(
725725
process.exit(0);
726726
}
727727

728-
logStep("Starting agent...");
728+
logStep("Provisioning complete. Connecting to agent session...");
729729

730730
// Reset terminal state before handing off to the interactive SSH session.
731731
// @clack/prompts may have left the cursor hidden or set ANSI attributes

packages/cli/src/shared/spawn-skill.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You have the \`spawn\` CLI installed. Use it to provision cloud VMs with AI agen
3030
spawn <agent> <cloud> --headless --output json --prompt "task description"
3131
\`\`\`
3232
33-
## Agents: claude, codex, openclaw, zeroclaw, opencode, kilocode, hermes, junie
33+
## Agents: claude, cursor, codex, openclaw, zeroclaw, opencode, kilocode, hermes, junie
3434
## Clouds: hetzner, digitalocean, aws, gcp, sprite
3535
3636
## Example
@@ -41,6 +41,21 @@ spawn claude hetzner --headless --output json --prompt "Implement the auth modul
4141
4242
Returns JSON: \`{"status":"success","ip_address":"...","ssh_user":"root","server_id":"..."}\`
4343
44+
## Running a prompt on a child VM
45+
46+
**--headless only provisions the VM — it does NOT run the prompt on it.**
47+
To actually execute work on the child, SSH in and run the agent:
48+
49+
\`\`\`bash
50+
ssh -o StrictHostKeyChecking=accept-new root@<ip_address> '~/.local/bin/claude --print "your prompt"'
51+
\`\`\`
52+
53+
### Known gotchas — do NOT waste time rediscovering these:
54+
- Agent binaries are at \`~/.local/bin/\`, NOT on the default PATH. Always use the full path: \`~/.local/bin/claude\`, \`~/.local/bin/cursor\`, etc.
55+
- Claude Code blocks \`--dangerously-skip-permissions\` as root. Use \`--print\` for one-shot prompts instead — it works as root and returns the response directly.
56+
- Do NOT try to create a non-root user to work around root restrictions — it requires copying config files (\`.claude.json\`, \`.claude/settings.json\`, env vars) and is fragile. Just use \`--print\`.
57+
- For long-running tasks, use \`spawn delete --name <name> --yes\` to clean up when done.
58+
4459
## Managing Children
4560
4661
- \`spawn list --json\` — see running children
@@ -61,8 +76,9 @@ const HERMES_SNIPPET = `
6176
6277
You have the \`spawn\` CLI for creating child cloud VMs with AI agents.
6378
Use \`spawn <agent> <cloud> --headless --output json --prompt "task"\` to delegate work.
64-
Available agents: claude, codex, openclaw, zeroclaw, opencode, kilocode, hermes, junie.
79+
Available agents: claude, cursor, codex, openclaw, zeroclaw, opencode, kilocode, hermes, junie.
6580
Cloud credentials are pre-configured. Run \`spawn list --json\` to see children.
81+
Note: --headless only provisions the VM. To run a prompt, SSH in: \`ssh root@<ip> '~/.local/bin/<agent> --print "prompt"'\`.
6682
`;
6783

6884
// ─── Agent config ───────────────────────────────────────────────────────────

packages/cli/src/shared/ssh.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ export async function waitForSsh(opts: WaitForSshOpts): Promise<void> {
347347
logInfo("SSH port 22 is open");
348348
break;
349349
}
350-
logStepInline(`SSH port closed (${attempt}/${maxAttempts})`);
350+
if (attempt % 5 === 0 || attempt === 1) {
351+
logStepInline(`Waiting for SSH port... (${attempt}/${maxAttempts} attempts)`);
352+
}
351353
await sleep(2000);
352354
}
353355

0 commit comments

Comments
 (0)