Skip to content

fix(scripts): stop pinning vm=False on sandbox creation - #2456

Merged
akirillo merged 3 commits into
mainfrom
fix/vm-only-sandbox-creation
Sep 18, 2026
Merged

akirillo merged 3 commits into
mainfrom
fix/vm-only-sandbox-creation

Conversation

@akirillo

@akirillo akirillo commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prime Sandboxes are now VM-only: an explicit vm=False hard-fails (410) on the new backend and the field is deleted in prime-sandboxes 0.3.0. This drops vm=False from the two create sites — scripts/benchmarks/controller.py (agent-bench roles) and scripts/evals/short_swe/build_controller.py (behavioral base/head builders) — so both controllers work against the VM-only backend.
  • docker_image stays: the VM backend auto-builds from the image on first launch, so no image handling changes.
  • Adds smoke tests asserting the create requests carry no vm value (model_dump(exclude_none=True) has no vm key). Works on the pinned prime-sandboxes==0.2.40 (vm defaults to None) and on 0.3.0 (field gone). No SDK pin bump is required: omitting vm works with both.
  • Updates sandbox docs to the VM-only surface: no --vm/--container mentions, --start-command replaced by the -- token-list form, removed client.expose() from the SDK snippet, network isolation via allow/deny lists, and "Docker environment"/"container" wording updated without deprecation framing.

Sweep results

  • No other vm=False/vm=True sites, no registry_credentials_id, no --container, no prime registry, images transfer-bulk, ssh/expose/unexpose/list-ports CLI usage in scripts.
  • --no-network-access flag reference replaced (network is now allow/deny lists via prime sandbox network / SDK fields).

Validation

  • uv run --locked ruff check . and ruff format --check . in scripts/benchmarks: pass.
  • uv run --locked python -m unittest discover -s tests (127 tests): pass.
  • uv run --locked --project scripts/benchmarks pytest -q scripts/evals/short_swe/tests (40 tests): pass.
  • uv run --locked --project scripts/benchmarks ruff check / ruff format --check on scripts/evals/short_swe: pass.
  • npm run check not run: no TS/JS files changed (biome/tsgo only cover packages/*/src|test).

Note

Stop pinning vm=False on sandbox creation requests in benchmark and eval scripts

  • Removes the explicit vm field from CreateSandboxRequest in controller.py (Controller.start) and build_controller.py so the server default applies instead of forcing Docker mode.
  • Adds tests in test_vm_sandbox_request.py and test_build_controller_request.py asserting the serialized requests omit vm while retaining a Docker image value.
  • Updates skill and benchmark documentation (SKILL.md, sandboxes.md, README.md) to describe VM sandboxes rather than Docker containers.
  • Risk: if the server default for vm is not false, benchmark and short-SWE build sandboxes will now start as VMs instead of containers, changing runtime behavior for those workflows.

Changes since #2456 opened

  • Updated LifecycleTests.test_sandbox_creation_does_not_inject_credentials_or_pin_vm test to verify that sandbox creation requests do not include a vm field [1646b8b]
  • Removed test files for VM sandbox request functionality and controller request building [1646b8b]

Macroscope summarized 3298f60.

Prime Sandboxes are VM-only: an explicit vm=False hard-fails on the new
backend and the field is gone from prime-sandboxes 0.3.0. Drop it from
the benchmark controller and the short-SWE build controller, and add
smoke tests that the create requests carry no vm value. Update sandbox
docs to the VM-only surface (no --vm/--start-command/expose).
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown

Prime Agent performance — completed

PR 1646b8bd compared with main b09e37d8.

Overall: 0 regressed · 0 improved · 41 no clear change.

Metric Main This PR Change
Cold startup 1,508.5 ms 1,455.7 ms ≈ -52.8 ms (-3.50%)
Warm startup 895.1 ms 850.2 ms ≈ -44.9 ms (-5.02%)
Installation 12.42 s 12.48 s ≈ +0.06 s (+0.49%)
Compressed release artifacts 72.62 MB 72.63 MB ≈ +0.0087 MB (+0.01%)
Installed footprint 568.49 MB 568.49 MB ≈ +0.0031 MB (+0.00%)
Idle memory, summed RSS 1,203.26 MB 1,154.77 MB ≈ -48.49 MB (-4.03%)

Python runtime

Metric Main This PR Change
Python kernel startup 104.8 ms 97.3 ms ≈ -7.4 ms (-7.09%)
Python cell round trip 0.495 ms 0.530 ms ≈ +0.035 ms (+7.11%)
Empty bash command 11.9 ms 11.5 ms ≈ -0.4 ms (-3.00%)
Bash git status 17.4 ms 17.4 ms ≈ -0.097 ms (-0.56%)
Bash 32 KiB output 12.3 ms 10.9 ms ≈ -1.4 ms (-11.09%)
35 cells / 9 shell calls 174.1 ms 155.6 ms ≈ -18.5 ms (-10.62%)
Python interrupt to done 1.605 ms 1.494 ms ≈ -0.111 ms (-6.92%)
Python state snapshot 27.0 ms 25.2 ms ≈ -1.8 ms (-6.66%)
Python state restore 392.5 ms 376.6 ms ≈ -15.9 ms (-4.04%)
Python idle RSS 28.44 MB 28.59 MB ≈ +0.15 MB (+0.54%)
Python RSS after pandas workload 97.51 MB 97.35 MB ≈ -0.15 MB (-0.16%)

Session transport

Metric Main This PR Change
Private frame decode, 32 MiB in 8 KiB chunks 28.3 ms 28.9 ms ≈ +0.5 ms (+1.80%)

UI interactions

Metric Main This PR Change
Resume large session (cold) 3,837.7 ms 3,664.2 ms ≈ -173.4 ms (-4.52%)
CPU, resume large session 5,940.0 ms 5,770.0 ms ≈ -170.0 ms (-2.86%)
Switch into large session 3,618.1 ms 3,343.8 ms ≈ -274.3 ms (-7.58%)
CPU, switch into large session 5,010.0 ms 5,200.0 ms ≈ +190.0 ms (+3.79%)
Open agents view from a session 160.5 ms 157.7 ms ≈ -2.8 ms (-1.75%)
CPU, open agents view 370.0 ms 340.0 ms ≈ -30.0 ms (-8.11%)
Full agents roster, many sessions 4.45 s 4.45 s ≈ -0.0028 s (-0.06%)
CPU, full agents roster 2.91 s 2.59 s ≈ -0.32 s (-11.00%)
Open another session from agents view 2,764.5 ms 2,503.9 ms ≈ -260.5 ms (-9.42%)
CPU, open from agents view 2,500.0 ms 2,250.0 ms ≈ -250.0 ms (-10.00%)
Reopen resident large session 537.4 ms 506.8 ms ≈ -30.6 ms (-5.69%)
CPU, reopen resident session 690.0 ms 720.0 ms ≈ +30.0 ms (+4.35%)
Open subagent session at depth 6 20,543.7 ms 20,631.3 ms ≈ +87.6 ms (+0.43%)
CPU, open subagent at depth 6 9,460.0 ms 9,590.0 ms ≈ +130.0 ms (+1.37%)
Open chain parent from agents view 4,028.7 ms 3,903.6 ms ≈ -125.2 ms (-3.11%)
CPU, open chain parent 4,010.0 ms 3,540.0 ms ≈ -470.0 ms (-11.72%)
Scheduled catalog, first request 1,972.0 ms 1,892.7 ms ≈ -79.3 ms (-4.02%)
CPU, scheduled catalog 3,190.0 ms 3,130.0 ms ≈ -60.0 ms (-1.88%)
Scheduled catalog, repeated request 1.2 ms 1.5 ms ≈ +0.3 ms (+22.74%)
CPU, repeated catalog 0.0 ms 0.0 ms ≈ +0.0 ms (N/A)
Cold worker with three catalog scans 932.4 ms 947.5 ms ≈ +15.1 ms (+1.62%)
CPU, cold worker and scans 1,370.0 ms 1,520.0 ms ≈ +150.0 ms (+10.95%)
UI memory after interactions 2,636.19 MB 2,718.82 MB ≈ +82.62 MB (+3.13%)

Sandbox cost: ~$0.1463 — no inference calls.
Run, logs, and downloadable raw results

Methodology and samples

Main resolved at 2026-09-18T18:50:43.459769+00:00. Harness b09e37d8.
Linux x64, 4 vCPU, 8 GB RAM, 20 GB disk; region us.
Image: node:24-bookworm@sha256:be23f54a88d34e8824c741b19b91064094f92c1c97b194144bfc8b50d67258e2.
Stock tools, skills, daemon, and Python bootstrap enabled; fresh homes and a fixed Git fixture.
Onboarding is dismissed; the editor starts without a selected model or submitted prompt.
Medians shown. Arrows require a 20% timing/memory change plus absolute floors and IQR.
These practical noise floors are not a statistical significance test.
Cold means stopped Prime processes; OS filesystem caches are not flushed.
No model requests or credentials. Installation excludes build/setup time.
Installer tarballs use loopback; npm/Python downloads use the network with fresh caches.
Artifact size counts release tarballs; footprint after first use includes registry packages.
MB is decimal. Summed RSS can double-count shared pages; PSS is recorded when available.
Provisioning, setup, and build durations are recorded separately in the raw results.
Kernel probes use the installed JSONL runtime, outside the TUI/TypeScript host.
Per trial: 50 Python cells, 5 calls per shell case, and one 35-cell mix (9 git status calls).
Cell/shell values are batch means; other runtime timings are single operations.
State fixture: a 10,000-row × 8-column integer DataFrame and a 10,000-integer list.
Restore runs in a fresh kernel, including pandas imports; kernel startup is excluded.
Kernel RSS covers the isolated Python process; loaded RSS follows the pandas workload.
Transport benches run node against the prepared source build, outside the installed home.
Frame decode times one 32 MiB private frame, snapshot-chunk header, pushed in
8 KiB chunks; the wire shape of multi-MB frames on the daemon-worker channels.
UI trials use a fresh fixture set: 194 top-level sessions including one ~40 MB transcript,
40 ledger fan-out children, and a 6-deep subagent chain (~46 spawn edges).
Large fixtures hold 1,999 complete triples (~5 MB JSONL); medium 119; subagents 399 each.
Interactions: cold --resume of a large session, warm /resume switch, left-arrow to agents view,
roster settle with many saved sessions, search-and-open of another large session,
reattaching to that resident session, opening the chain parent, and drilling to depth 6.
Readiness is the rendered transcript tail plus a confirmed editor echo.
CPU metrics sum utime+stime across the whole benchmark-user process tree per interaction.
UI memory sums RSS after the interactions; PTY byte counts are in the raw results.
A separate catalog fixture has 2,300 sessions, 2,298 edges, and 13 paused scheduled-job owners.
Catalog timings cover first/repeated reads and cold worker creation under three pending scans.
All expected jobs and owner metadata are checked; worker readiness excludes TUI rendering.
Costs estimate full sandbox lifetimes at configured rates, including setup and build.
Budget target: $1; not a billing cap. Performance changes are informational.
Failed or incomplete execution fails the workflow; saved artifacts remain available.
Each side stops a phase after 2 identical consecutive failures.
Skipped trials are not attempted samples. Warm startup requires a successful cold launch.

Metric Main successful/attempted PR successful/attempted Main spread PR spread
Cold startup 10/10 10/10 IQR 142.3 ms IQR 106.1 ms
Warm startup 10/10 10/10 IQR 17.8 ms IQR 13.7 ms
Installation 3/3 3/3 range 0.41 s range 0.20 s
Compressed release artifacts 1/1 1/1
Installed footprint 1/1 1/1
Idle memory, summed RSS 10/10 10/10 IQR 113.35 MB IQR 79.34 MB
Python kernel startup 10/10 10/10 IQR 2.3 ms IQR 38.9 ms
Python cell round trip 10/10 10/10 IQR 0.022 ms IQR 0.080 ms
Empty bash command 10/10 10/10 IQR 0.7 ms IQR 2.0 ms
Bash git status 10/10 10/10 IQR 2.1 ms IQR 1.7 ms
Bash 32 KiB output 10/10 10/10 IQR 1.5 ms IQR 1.4 ms
35 cells / 9 shell calls 10/10 10/10 IQR 12.8 ms IQR 21.7 ms
Python interrupt to done 10/10 10/10 IQR 0.105 ms IQR 0.153 ms
Python state snapshot 10/10 10/10 IQR 1.1 ms IQR 1.0 ms
Python state restore 10/10 10/10 IQR 26.4 ms IQR 27.0 ms
Python idle RSS 10/10 10/10 IQR 4.04 MB IQR 1.53 MB
Python RSS after pandas workload 10/10 10/10 IQR 4.39 MB IQR 2.24 MB
Private frame decode, 32 MiB in 8 KiB chunks 10/10 10/10 IQR 2.6 ms IQR 6.9 ms
Resume large session (cold) 3/3 3/3 range 1,006.5 ms range 692.7 ms
CPU, resume large session 3/3 3/3 range 1,280.0 ms range 880.0 ms
Switch into large session 3/3 3/3 range 728.1 ms range 302.3 ms
CPU, switch into large session 3/3 3/3 range 610.0 ms range 420.0 ms
Open agents view from a session 3/3 3/3 range 18.7 ms range 23.3 ms
CPU, open agents view 3/3 3/3 range 110.0 ms range 110.0 ms
Full agents roster, many sessions 3/3 3/3 range 0.0068 s range 0.0078 s
CPU, full agents roster 3/3 3/3 range 0.33 s range 0.23 s
Open another session from agents view 3/3 3/3 range 221.4 ms range 209.1 ms
CPU, open from agents view 3/3 3/3 range 300.0 ms range 250.0 ms
Reopen resident large session 3/3 3/3 range 16.1 ms range 29.2 ms
CPU, reopen resident session 3/3 3/3 range 180.0 ms range 160.0 ms
Open subagent session at depth 6 3/3 3/3 range 443.5 ms range 623.9 ms
CPU, open subagent at depth 6 3/3 3/3 range 1,370.0 ms range 500.0 ms
Open chain parent from agents view 3/3 3/3 range 132.0 ms range 299.3 ms
CPU, open chain parent 3/3 3/3 range 320.0 ms range 140.0 ms
Scheduled catalog, first request 3/3 3/3 range 228.1 ms range 307.3 ms
CPU, scheduled catalog 3/3 3/3 range 290.0 ms range 470.0 ms
Scheduled catalog, repeated request 3/3 3/3 range 0.2 ms range 0.8 ms
CPU, repeated catalog 3/3 3/3 range 0.0 ms range 10.0 ms
Cold worker with three catalog scans 3/3 3/3 range 115.0 ms range 99.5 ms
CPU, cold worker and scans 3/3 3/3 range 90.0 ms range 520.0 ms
UI memory after interactions 3/3 3/3 range 67.58 MB range 106.93 MB

Comment thread packages/coding-agent/skills/prime-intellect/references/sandboxes.md Outdated
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
@akirillo
akirillo merged commit 976ea10 into main Sep 18, 2026
51 checks passed
@akirillo
akirillo deleted the fix/vm-only-sandbox-creation branch September 18, 2026 20:32
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