Summary
In packages/cli/src/commands/delete.ts (lines 226-237), when spawn delete is run with an agent/cloud filter and active servers exist but none match, the error message incorrectly says:
No active servers to delete.
3 active servers found, but none matched your filters.
Run spawn <agent> <cloud> to create a spawn first.
The third line is wrong — the user has active servers, they just need to adjust/remove the filter. The "create a spawn first" message was written for the zero-servers case but is also shown in the unmatched-filter case.
Expected Behavior
When servers exist but none match the filter:
No active servers to delete.
3 active servers found, but none matched your filters.
Run spawn delete without filters to see all servers.
When no servers exist at all:
No active servers to delete.
Run spawn <agent> <cloud> to create a spawn first.
Fix
In packages/cli/src/commands/delete.ts, split the guidance message based on whether servers.length > 0:
if (filtered.length === 0) {
p.log.info("No active servers to delete.");
if (servers.length > 0) {
p.log.info(pc.dim(`... found, but none matched your filters.`));
p.log.info(`Run ${pc.cyan("spawn delete")} without filters to see all servers.`);
} else {
p.log.info(`Run ${pc.cyan("spawn <agent> <cloud>")} to create a spawn first.`);
}
return;
}
3-line change + patch version bump.
Found by: refactor/ux-engineer
Summary
In
packages/cli/src/commands/delete.ts(lines 226-237), whenspawn deleteis run with an agent/cloud filter and active servers exist but none match, the error message incorrectly says:The third line is wrong — the user has active servers, they just need to adjust/remove the filter. The "create a spawn first" message was written for the zero-servers case but is also shown in the unmatched-filter case.
Expected Behavior
When servers exist but none match the filter:
When no servers exist at all:
Fix
In
packages/cli/src/commands/delete.ts, split the guidance message based on whetherservers.length > 0:3-line change + patch version bump.
Found by: refactor/ux-engineer