INNER CODE UNIT · Python

touch_sandbox

deeplethe/forkd · sdk/mcp/sandstorm_mcp/server.py:203

def touch_sandbox(sandbox_id: str) -> dict[str, Any]:
    """Mark a sandbox used, which brings it back to hot.

    branch_sandbox needs a hot sandbox and answers 409 otherwise, and an idle
    one is moved to a colder tier.
    """
    with _client() as c:
        r = c.post(f"/v1/sandboxes/{sandbox_id}/touch")
        r.raise_for_status()
        return r.json()


@mcp.tool()
def branch_sandbox(sandbox_id: str, tag: str) -> dict[str, Any]:
    """Checkpoint a running sandbox into a new snapshot tag.

    The parent keeps running, after a short pause. Any later spawn_sandboxes
    call can use the tag as its snapshot_tag, to fan out N children that all

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…