Repository navigation
feat(deploy_sandbox): default an unsized sandbox to 1 vCPU - #229
Conversation
A deploy_sandbox step that sets no cpu now reserves 1 vCPU instead of 2, matching A2AAgent.deploy and the beta_scale default for env and agent deploys. Steps that set cpu, which includes every stored step because to_dict writes it, keep their value. On Modal a scalar cpu is a request with bursting allowed, so the lower default cuts idle cost without capping boot. On beta_scale it is a hard cap; callers there that care about boot time should set cpu explicitly. Part of FD-4008. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Automated Claude routine — Env Pod PR Context Review. This is a bot, not Edgar Arakelyan; not a human review. Some context from outside this diff, on where the new default actually lands. The summary reasons about
So on those two the change is inert: no idle-cost saving to expect, and equally no boot-time regression to worry about. The behaviour change is confined to providers that pass Might be worth a line in the summary, since as written it reads as uniform across providers. Generated by Claude Code |
Thanks, confirmed: Tenki ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
deploy_sandboxsteps that set nocpunow reserve 1 vCPU instead of 2, on every provider.The old 2.0 was the only CPU default in the framework above 1:
A2AAgent.deploy);beta_scaleenv and agent deploys default to 1.0;create_vm/create_containerdefaults are 1.0.This makes
deploy_sandboxconsistent with them. Nothing recorded why it was 2.Steps that set
cpuare unchanged, and that includes everydeploy_sandboxstep stored today, becauseto_dictwrites the value out. So the new default only reaches new tasks that leavecpuunset.Part of FD-4008 (Modal sandbox cost). Modal bills whichever is higher, the request or actual use, and a scalar
cpuis a request, not a cap. A lower default therefore cuts idle cost without capping boot bursts.What changes per provider
beta_scale, smol_vm, e2b, local: these pass 1 through as a hard core count. That matches the 1.0beta_scalealready gives agents and envs by default. A caller who needs more for boot setscpu: 2, as every currentbeta_scalecaller already sets its own value (2–8).Today, the callers that leave
cpuunset are onmodal_vm(for example the hub's artifact-generation builder). Every non-Modal caller sets its own.A Modal-only alternative is in draft #231. It's a per-provider
DEPLOY_SANDBOX_CPU(2.0 on the base, 1.0 on Modal). It's here in case reviewers would rather leave other providers at 2.Production data (Snowflake
AGENTENV_MONGO, Datadogmodal.cpu.*, last 30 days)deploy_sandboxruns already requested less than 1 vCPU.modal_vmworkload at two sizes: 0.125 vCPU (Sep 24–Oct 2, ~50K runs) and 2 vCPU (Oct 3 onward, ~176K runs).Experiment (dev stage, no LLM)
Each run was
deploy_sandbox(VM, 16 GiB) followed byinstall_agent(claude-code-cli), attributed to the agent-env unattributed test project. The side-by-side batch ran 1 and 2 vCPU onmodal_vmat the same time:install_agenttimemodal_vmmodal_vmbeta_scalebeta_scale* The failed run lost its connection to the dev MongoDB from the laptop (no primary), not a CPU problem.
beta_scalethe request is a hard cap, so install takes about 1.7× longer, though it still finishes well within timeouts.Testing
tst/unit/task_step/deploy_sandbox_default_cpu_test.pycovers:from_dictdefaults;cpuas written;create_vmandcreate_containerreceive, for an unset and an explicitcpu.deploy_sandboxstep tests pass locally, and so doesruff check. The rest oftst/unitruns in CI; my local venv predatesmain's current dependencies (sail, Vercel), so some unrelated provider tests can't import locally.🤖 Generated with Claude Code


Confidence Score: 5/5
No blocking issues were found in the reviewed changes.Summary
Changes the default CPU request for unsized
deploy_sandboxsteps from 2 to 1 vCPU.Reviews (2) · Last reviewed commit: "test(deploy_sandbox): cover the containe..." · Reviewed by Greptile