From 2321352a6bafdbddfcffa715fa5c8f1025b0b466 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Wed, 25 Feb 2026 15:46:34 -0800 Subject: [PATCH] fix: don't mark server deleted when cloud API delete fails (#1935) When spawn delete encounters a cloud API error (network timeout, 500, auth failure), the server is still running. Marking the record as deleted in this case hides it from spawn delete/spawn list, preventing retry and causing untracked billing. Only mark as deleted on: (1) successful deletion, (2) server already gone/404. Error paths keep the record active for retry. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 --- packages/cli/src/commands.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/commands.ts b/packages/cli/src/commands.ts index 0d607d2a..9f1abd11 100644 --- a/packages/cli/src/commands.ts +++ b/packages/cli/src/commands.ts @@ -2282,7 +2282,6 @@ async function execDeleteServer(record: SpawnRecord): Promise { } p.log.error(`Delete failed: ${errMsg}`); p.log.info("The server may still be running. Check your cloud provider dashboard."); - markRecordDeleted(record); return false; } };