Skip to content

feat(cli): run Orca workspaces on BoxCompute VMs (0.14.0) - #32

Merged
farhan-helmy merged 1 commit into
mainfrom
feat/orca-recipe
Nov 23, 2026
Merged

farhan-helmy merged 1 commit into
mainfrom
feat/orca-recipe

Conversation

@farhan-helmy

@farhan-helmy farhan-helmy commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

bxc orca create|suspend|resume|destroy|keep-open: the lifecycle steps of the BoxCompute plugin's Orca (orca.dev) VM recipe (boxcompute/orca-plugin, published after this). Orca runs them in the user's repository with its ORCA_* variables; create/resume print one recipe-result JSON on stdout, the others read Orca's lifecycle payload on stdin.

  • create: a Large VM (--size or BOXCOMPUTE_ORCA_SIZE; idempotency key from the Orca instance id, state saved before slow work so a retry reuses it), then a polled operation installs Orca's server build matching the desktop's ORCA_VERSION (checked against the release's sha256sums) and clones the repository's remote over HTTPS; a preview on 6768; orca-ide serve --bind 127.0.0.1 --pairing-address wss://<preview> --recipe-json started detached. Claude Code and Codex install in the background from their vendors' installers (the same ones the web agent's runtime catalog uses).
  • suspend/resume/destroy: stop, start + re-pair (orca-ide pair --address when the server is still up), delete; destroy finds the VM by name when Orca never got a result.
  • keep-open: POST /api/v2/sandboxes/{id}/previews/{previewId}/keep-open (web-agent 0.272.0, #671) for each awake workspace; the plugin's worker runs it every 20 minutes while Orca is open, which keeps the link (pairing embeds the hostname) and the VM (a WebSocket counts as use only when it opens) up.

Security

  • The git token (GH_TOKEN / GITHUB_TOKEN / gh auth token, GitHub remotes only) reaches the VM as a file, never argv or env (execution logs keep those), via GIT_ASKPASS, deleted after the clone/fetch.
  • The pairing code is read back with the files API and deleted, never printed by a command on the VM.
  • Scripts take every value from env, never interpolated text. Local state (orca/<instance>.json, VM + preview ids) is mode 0600 beside the credential.

Verified

  • Unit: test/orca.test.ts (12). Full suite on an XL VM: 105 pass, 2 fail — the same two VM creation tests fail on unmodified main there.
  • Live against production: create 86 s (VM 58 s, server install 17 s, serve 11 s); a second Orca runtime paired with the printed code, created a worktree of the cloned repo and ran a terminal (Claude Code 2.1.330 present); suspend 17 s, resume 81 s with a fresh pairing and the worktree intact; destroy deleted the VM.
  • Orca's own runner: orca-ide vm recipe doctor boxcompute-vm --provision (1.4.271) passed — create, result validation, destroy — in 76 s.
  • First attempt hit HTTP 524 (one execute held past 100 s), which is why setup is a polled operation.

🤖 Generated with Claude Code


Run Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

bxc orca create|suspend|resume|destroy|keep-open are the lifecycle steps of the
BoxCompute plugin's Orca VM recipe: a VM per workspace running orca-ide serve on
loopback, reached through a preview that keep-open renews while Orca runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@farhan-helmy
farhan-helmy merged commit 4063373 into main Nov 23, 2026
5 checks passed
@farhan-helmy
farhan-helmy deleted the feat/orca-recipe branch November 23, 2026 03:40
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