fix(ux): replace stale 'spawn connect' hints with 'spawn last' (#3312)

Two user-facing reconnect hints missed by #3311 still showed
'spawn connect <name>', which is not a registered command. Users
following the hint get 'Unknown agent or cloud: connect'.

Agent: code-health

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Ahmed Abushagur <ahmed@abushagur.com>
This commit is contained in:
A 2026-04-19 01:31:30 -07:00 • committed by GitHub
parent cfd428d213
commit 97c073247a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 8 deletions

View file

@ -908,7 +908,7 @@ describe("runOrchestration", () => {
await runOrchestrationSafe(cloud, agent, "testagent");
// launchCmd should be called (to save it for later `spawn connect`)
// launchCmd should be called (to save it for later `spawn last`)
expect(agent.launchCmd).toHaveBeenCalledTimes(1);
expect(cloud.interactiveSession).toHaveBeenCalledTimes(0);
expect(capturedExitCode).toBe(0);

View file

@ -164,12 +164,7 @@ export async function cmdConnect(connection: VMConnection, agentKey?: string): P
p.log.step(`Connecting to Daytona sandbox ${pc.bold(connection.server_name || connection.server_id)}...`);
const { buildInteractiveSshArgs } = await import("../daytona/daytona.js");
const args = await buildInteractiveSshArgs(connection.server_id);
return runInteractiveCommand(
args[0],
args.slice(1),
"Daytona SSH connection failed",
`spawn connect ${connection.server_name || connection.server_id}`,
);
return runInteractiveCommand(args[0], args.slice(1), "Daytona SSH connection failed", "spawn last");
}
// Handle SSH connections

View file

@ -625,7 +625,7 @@ export async function handleRecordAction(
if (!conn.deleted) {
const reconnectHint =
conn.cloud === "daytona"
? `spawn connect ${conn.server_name || conn.server_id || conn.ip}`
? "spawn last"
: conn.ip === "sprite-console"
? `sprite console -s ${conn.server_name}`
: `ssh ${conn.user}@${conn.ip}`;