feat(sandboxes): add VM live process handles - #819
Merged
Conversation
hallerite
force-pushed
the
codex/vm-process-sessions
branch
from
August 4, 2026 19:57
7bd55ca to
e95ff4e
Compare
hallerite
force-pushed
the
codex/vm-process-sessions
branch
from
August 4, 2026 20:37
e95ff4e to
cd88d08
Compare
hallerite
marked this pull request as ready for review
August 4, 2026 20:58
hallerite
requested review from
DamianB-BitFlipper,
JannikSt,
JohannesHa,
burnpiro,
kcoopermiller and
willccbb
as code owners
August 4, 2026 20:58
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cd88d08. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd88d085fb
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
DamianB-BitFlipper
previously approved these changes
Aug 4, 2026
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.

Summary
AsyncSandboxClient.open_process()for live commands in VM sandboxesWhy
Verifiers harness sessions need to retain one process across interaction turns. The SDK currently buffers a command to completion, which forces callers to invent a sidecar transport. A native process handle makes persistence a runtime capability instead.
Validation
Consumed by PrimeIntellect-ai/verifiers#2249.
Note
Medium Risk
New long-lived gateway streams and process control RPCs affect VM sandbox runtime behavior and cleanup; scope is additive and VM-only with explicit container rejection.
Overview
Adds VM-only live process handles so callers can keep one command running across multiple interaction turns instead of waiting for buffered
execute_commandcompletion.AsyncSandboxClient.open_process()starts a command-session Start stream with stdin enabled and a 24-hour transport timeout, then returnsAsyncSandboxProcesswith async byte iterators for stdout/stderr,write_stdin,wait,terminate/kill, andaclose(graceful shutdown with terminate→kill fallback). Container sandboxes raiseAPIError; theuserargument is rejected for VM processes.Command-session helpers gain SendInput and SendSignal RPC wiring, optional
stdinon start requests, andparse_command_session_start_event(start PID, raw stdout/stderr chunks, end exit code) whilecollect_command_session_start_eventdelegates to it for the existing one-shot execute path.AsyncSandboxProcessis exported from the public package API; tests cover streaming, stdin/signal RPCs, and container rejection.Reviewed by Cursor Bugbot for commit 84608b9. Bugbot is set up for automated code reviews on this repo. Configure here.