Repository navigation
Run the agent computer on a BoxCompute VM - #190
Open
farhan-helmy wants to merge 2 commits into
Open
farhan-helmy wants to merge 2 commits into
farhan-helmy wants to merge 2 commits into
Conversation
Adds COMPUTER_PROVIDER=boxcompute, a second opt-in desktop provider beside e2b-desktop. Each owner gets one large BoxCompute VM, matched by metadata, with a Wayland desktop and Chrome; terminal, files, use_desktop, the Desktop tab and the chat card work as for E2B. Docker and E2B behaviour is unchanged. The neutral desktop pieces (screen, action schema, command wrapper) move to computer-desktop.ts, and the service, tools, conversation and mobile app check a desktop capability instead of the E2B provider name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live smoke test found what the in-memory fake could not: - execute reads the result BoxCompute wraps in `result` - Stop retries the 409 BoxCompute answers until an accepted stop has settled, for about 90 seconds - screenshots are PNG, because BoxCompute's VM image does not capture JPEG - stderr is kept before stdout under the shared output cap, so the overflow notice survives a runaway command - reads and whole-file uploads ride out a dropped connection or a gateway error, as during a BoxCompute deploy; commands and input are never resent The smoke test now serves its typing page as HTML that fills the window, checks for Chrome with a pattern that cannot match itself, probes the running command through BoxCompute instead of the lease that command holds, and cleans up its VM even when a request drops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
farhan-helmy
marked this pull request as ready for review
October 20, 2026 14:34
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds
COMPUTER_PROVIDER=boxcompute, a second opt-in desktop provider besidee2b-desktop. Docker stays the default, and the Docker and E2B paths behave as before.With it, each owner gets one BoxCompute VM. That is an Ubuntu VM with a minimal Wayland desktop (sway), Google Chrome, Python 3, git and outbound internet. It is matched by deployment and owner metadata, as with E2B. Stop stops the VM: every process ends and
/workspacestays on its disk.files.pycontract: the 30 second limit, exit code 124 on timeout, the output caps, symlink refusals and response shape. BoxCompute's exec API takes no stdin, so the command travels in an environment variable and file operations use BoxCompute's file API. A file over 8 MB is written in parts and joined in the VM.use_desktopkeeps its actions. Each one becomes one BoxCompute desktop call whose response carries the screenshot taken after it.interrupted, a fresh screenshot is taken, and the input is never sent again.computer-e2b-desktop.tsto a neutralcomputer-desktop.ts, and E2B re-exports them. The service, tools, conversation step limit and mobile app now checkdesktopon the computer snapshot instead of thee2b-desktopprovider name. E2B behaviour is unchanged.BOXCOMPUTE_API_KEYand a uniqueCOMPUTER_DEPLOYMENT_ID, because VMs are matched across the whole account.BOXCOMPUTE_WORKSPACE_IDis optional. By default a workspace named OpenMuse is created once.BOXCOMPUTE_API_URLis optional.docs/COMPUTER.mdhas a setup section and how the provider differs from Docker.SECURITY.mdcovers the threat model: internet egress, root in the VM, and the viewer link as a bearer secret.Fail-closed behaviour mirrors E2B:
autoResume: false. A command, file operation or desktop action on a stopped computer is refused (SANDBOX_STOPPED) instead of resuming it; only Start wakes it.Disclosure: I work on BoxCompute. Desktop control, metadata matching and
autoResumewere added to BoxCompute's public API this week for this integration.Verification
The live smoke test runs against a real BoxCompute VM with a random deployment ID and deletes every VM it created. It covers:
The first live runs found five provider bugs that the in-memory fake could not catch. All are fixed in the second commit:
resultThey also found a BoxCompute bug: after Stop and Start,
chromewould not launch because of a stale profile lock. That is fixed on the BoxCompute side (0.84.1, live). The unmodified test then passed end to end: VM and desktop started in 38 s, the PDF imported in 22 s, and the VM and desktop resumed in 41 s.Integration limits
pnpm test:browserand the browser-container suite were not run, because the browser worker is untouched.🤖 Generated with Claude Code