Skip to content

[docs-scanner] Sandboxes API tutorial mentions client.get() without showing how to use it #26224

Description

@docker-agent

File: content/manuals/ai/sandboxes-api/get-started.md

Issue

The tutorial tells readers what to do if the program stops unexpectedly, but doesn't show them how:

If the program stops after printing the sandbox name, retrieve the sandbox with client.get(name) and delete it when you're finished.

This is the only mention of client.get() in the tutorial, and there's no example of how to use it. The tutorial shows client.kits.launchAndWait() and sandbox.delete(), but never demonstrates retrieval.

Why this matters

A reader following the tutorial who encounters this failure scenario won't know:

  • What to import or how to call client.get(name)
  • What the name parameter should be (the full sandboxes/<uid> string?)
  • What to do with the returned object
  • Whether they need to check the sandbox state before deleting

The tutorial is aimed at first-time users ("Run your first cloud sandbox"), so they can't be expected to infer the API from this brief mention.

Suggested fix

Add a brief code example showing recovery, either inline or in a collapsed section:

// If the program stopped, retrieve and clean up:
const existing = await client.get('sandboxes/<uid>');
const latest = await existing.refresh();
await latest.delete({ force: true });

Or reference the cookbook with a specific example: "See Find a process you lost track of for recovery steps."


Found by nightly documentation quality scanner

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions