feat(server): run modal sandboxes on the vm runtime - #41177
Merged
Conversation
This was referenced Aug 8, 2026
This was referenced Aug 8, 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.
What
Modal sandboxes now always run on Modal's Full-VM runtime (beta, enabled for our account) instead of the default gVisor container, and the kill mechanism is fixed for it. Per the direction from today's call: one runtime, no knob — we're building for ourselves.
Why VM: a real kernel (6.12.8+ vs gVisor's userspace 4.19 shim) with real device nodes, so workspaces can run Docker and other kernel-dependent workloads — the "employee with a real computer" posture. Only filesystem snapshots are supported on it (no memory snapshots), which matches the chosen persistence design exactly.
How
createModalSandboxpassesexperimentalOptions: { vm_runtime: true }unconditionally (caller-supplied experimental options are preserved and merged)kill(-pgid, SIG)returns 0 and nothing dies, while direct-pid signals work (verified same PID namespace, clean signal masks, even SIGKILL no-ops as a group signal). The KILL script now enumerates the target group from/proc/*/stat(parsing past the last)so comm names can't confuse fields) and signals each member directly, in two passes to catch children forked mid-scanScope
packages/serveronly. No environment contract changes, no workspace domain model (that remains PR 5b).Testing
OPENCODE_TEST_MODAL=1) against a real VM-runtime sandbox: 10/10 including the kill regression test, three consecutive runs