Skip to content

GPU Sandbox Support#398

Open
DamianB-BitFlipper wants to merge 9 commits intomainfrom
gpu-sandbox-support
Open

GPU Sandbox Support#398
DamianB-BitFlipper wants to merge 9 commits intomainfrom
gpu-sandbox-support

Conversation

@DamianB-BitFlipper
Copy link
Contributor

@DamianB-BitFlipper DamianB-BitFlipper commented Feb 25, 2026

The renaming of STOPPED to PAUSED aligns with the backend name change. This is vestigial code not yet used so, technically breaking, but ok to do.


Note

Medium Risk
Introduces a new command-execution transport (Connect RPC) and new runtime deps, which could affect command reliability and error handling for GPU sandboxes. Changes are covered by new unit tests but touch a core user path (execute_command/CLI create).

Overview
Adds GPU sandbox support end-to-end: gpu_type is introduced on sandbox models/requests with validation (GPU count requires a type) and docs/examples updated accordingly.

Updates command execution to choose transport by sandbox type: CPU sandboxes continue using the REST gateway /exec, while GPU sandboxes execute commands via a new Connect RPC streaming implementation backed by generated protobufs and new dependencies (connect-python, protobuf).

Improves UX/error handling: CLI sandbox create now supports --gpu-count/--gpu-type, disallows Docker images for GPU sandboxes (uses an internal runtime image), displays GPU type in details, renames STOPPED to PAUSED in status mappings, and maps gateway 502 sandbox_not_found to a not-running error; adds targeted tests for these behaviors.

Written by Cursor Bugbot for commit 4771f42. This will update automatically on new commits. Configure here.

@DamianB-BitFlipper DamianB-BitFlipper marked this pull request as ready for review February 26, 2026 00:13
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7b0f97b95

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable autofix in the Cursor dashboard.


raise APIError(f"Connect RPC failed ({e.code.value}): {e.message}") from e
except Exception as e:
raise APIError(f"Request failed: {e.__class__.__name__}: {e}") from e
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APIError raised inside try gets double-wrapped by except

Medium Severity

In _execute_command_connect_rpc, the APIError("Command stream ended without exit code") raised at line 567 is inside the try block. Since APIError extends Exception but not ConnectError, it falls through to except Exception as e: and gets re-wrapped as APIError(f"Request failed: APIError: Command stream ended without exit code"). The same issue exists in the async version. This produces a misleading error message and loses the original intent. The except Exception handler was designed for truly unexpected errors, not intentional APIError raises.

Additional Locations (1)

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant