Skip to content

Use server-provided RunURL in sandbox commands#368

Merged
robinaugh merged 1 commit intomainfrom
fix/sandbox-open-url
Feb 19, 2026
Merged

Use server-provided RunURL in sandbox commands#368
robinaugh merged 1 commit intomainfrom
fix/sandbox-open-url

Conversation

@robinaugh
Copy link
Contributor

@robinaugh robinaugh commented Feb 19, 2026

Summary

  • Sandbox commands (start --id, exec, CheckExistingSandbox) were constructing URLs as https://cloud.rwx.com/mint/runs/<id>, which missed the org slug and ignored RWX_HOST
  • Server-provided RunURL (from InitiateRun) is now persisted in SandboxSession and used when available
  • When no server-provided URL exists, RunURL is left empty so --open is a no-op rather than opening a broken URL

When is RunURL empty?

  • start --id <run-id> — reattaching to an existing run by ID doesn't call InitiateRun, so there's no server-provided URL. This is the "connect to a sandbox you didn't create" case.
  • Pre-existing sessions — sessions saved before this change won't have RunURL in the stored JSON. These are transient and will be replaced on the next reset or start.

In all other flows (start, exec auto-create, reset), the server-provided URL with the correct org slug is stored and used.

Test plan

  • go build ./cmd/rwx compiles
  • go test ./internal/cli/... ./cmd/... passes
  • golangci-lint run ./... clean
  • Manual: rwx sandbox start then rwx sandbox exec --open opens correct URL with org slug
  • Manual: rwx sandbox start --id <id> --open does not open browser (no server URL available)

@robinaugh robinaugh self-assigned this Feb 19, 2026
Sandbox commands (start --id, exec, CheckExistingSandbox) were
constructing URLs as https://cloud.rwx.com/mint/runs/<id>, which
missed the org slug and ignored RWX_HOST. Now the server-provided
RunURL is persisted in SandboxSession and used when available.
When no server-provided URL exists (e.g. reattach via --id),
RunURL is left empty so --open is a no-op rather than opening
a broken URL.
@robinaugh robinaugh force-pushed the fix/sandbox-open-url branch from a5691fc to 22d3e95 Compare February 19, 2026 19:12
@robinaugh robinaugh marked this pull request as ready for review February 19, 2026 19:24
@robinaugh robinaugh merged commit 256b6c0 into main Feb 19, 2026
1 check passed
@robinaugh robinaugh deleted the fix/sandbox-open-url branch February 19, 2026 19:34
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.

2 participants