Skip to content

Expose sandbox provisioning progress and failure details in the Rust SDK #6052

Backlog

Description

@danylokravchenko

User Story

I use OpenShell to provision isolated workers from a Rust application. When worker creation failed, the only detail I saw was that the sandbox had “entered error phase.” I need to show users what the gateway knows about startup progress and, when it reports a failure reason, show that reason in the same interface where they started the worker.

Problem Statement

The OpenShell Rust SDK exposes the sandbox’s high-level phase. Its high-level API lacks a way to subscribe to status snapshots and omits the readiness conditions and provisioning timing that the gateway already reports.

Impact / Why This Matters

Today, SDK consumers have to inspect gateway logs or use the raw gRPC API to get more context about startup failures. A generic error leaves users guessing whether to wait, retry, or investigate a problem.

Proposed Design

After creating a sandbox, a Rust SDK client can watch its status and update the UI as new snapshots arrive. Each snapshot includes the current phase and any readiness conditions or provisioning timing the gateway has reported. A client opening an existing sandbox can fetch the same information in a one-time status read.

use futures::StreamExt;
use openshell_sdk::SandboxPhase;

let workspace = client.workspace("team");
let updates = workspace.watch_sandbox_status("worker-1");
futures::pin_mut!(updates);

while let Some(update) = updates.next().await {
    let sandbox = update?;
    println!("{:?}", sandbox.phase);

    for condition in &sandbox.conditions {
        println!("{} — {}", condition.reason, condition.message);
    }

    if matches!(
        sandbox.phase,
        SandboxPhase::Ready | SandboxPhase::Completed | SandboxPhase::Error
    ) {
        break;
    }
}

Acceptance Criteria

  • A Rust SDK client can fetch the current sandbox status and subscribe to subsequent status snapshots in both the default workspace and a named workspace.
  • When the gateway reports a readiness condition, clients can read its reason, message, and transition time as separate fields.
  • When the gateway reports a provisioning deadline or timeout, clients can distinguish an attempt still in progress from one the gateway has timed out.
  • Clients can still read the sandbox phase when an older gateway omits provisioning details.

Alternatives Considered

OpenShell CLI offers this functionality.

Polling get_sandbox can track the phase. The raw WatchSandbox RPC can supply richer status, but each Rust application must build its own request handling and translate the responses. Gateway middleware, interceptors, and providers address different extension points. The status is already available from the gateway, so the proposed SDK API would make it directly usable by Rust clients.

Agent Investigation

No response

Checklist

  • I've reviewed existing issues and the published docs
  • This is a design proposal, not a "please build this" request

Activity

  1. added
    state:triage-needed
    on Nov 28, 2026
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

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions