From cb0f8b233afe30cee2c2671022adefe1988addc7 Mon Sep 17 00:00:00 2001 From: Niels Kaspers Date: Wed, 30 Sep 2026 09:04:56 +0300 Subject: [PATCH] docs(sandboxes): show how to recover an existing sandbox --- content/manuals/ai/sandboxes-api/get-started.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/content/manuals/ai/sandboxes-api/get-started.md b/content/manuals/ai/sandboxes-api/get-started.md index 4e2ac70ea64..c83b990a8a6 100644 --- a/content/manuals/ai/sandboxes-api/get-started.md +++ b/content/manuals/ai/sandboxes-api/get-started.md @@ -111,8 +111,18 @@ For CI jobs and other unattended applications, use [PAT authentication](authentication.md#authenticate-automation-with-a-pat). If the program stops after printing the sandbox name, retrieve the sandbox -with `client.get(name)` and delete it when you're finished. Closing the client -doesn't delete the sandbox. +with `client.get(name)` and delete it when you're finished. The `name` value is +the full resource name printed by the program, such as +`sandboxes/`: + +```typescript +const existing = await client.get(name); +const latest = await existing.refresh(); +const deleting = await latest.delete({ force: true }); +await deleting?.waitUntilDeleted(); +``` + +Closing the client doesn't delete the sandbox. ## Next steps