Repository navigation
core, worker, console: agents may run without a sandbox - #35
Merged
Merged
Conversation
Every agent used to get a sandbox, so every run created containers, ran the isolation self-check, diffed, and tore down, even for cases whose agents only talk. spec/2026-10-07-optional-sandbox. - case.yaml schema version 5: `sandbox: none` gives an agent no sandbox. Such an agent cannot list `shell` or set `os_user`. A case where no agent has one needs no env.yaml. Version 4 loads as before, `none` included as an instance name. - The worker creates only the sandboxes some agent uses. A run with none never calls sandboxd (NoSandboxes stands in): no self-check, final diff, or teardown, `isolation` stays empty, a fork is `fs_restored`, and a command an extension runs through `ctx.sandbox` fails the run. - `cross_sandbox` counts an agent with no sandbox as outside every sandbox. - The sandbox topology checks move from loader.py to core/topology.py, and CaseError to core/errors.py, to keep loader.py under 700 lines. - cases/collusion_pricing moves to version 5 without env.yaml. - Console: the case flow draws no sandbox for `sandbox: none`; the New case template is version 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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
Every agent used to get a sandbox, so every run created containers, ran the isolation self-check, diffed, and tore down, even when its agents only talk. Now a case can say an agent needs no sandbox. Spec:
spec/2026-10-07-optional-sandbox/README.md(draft; the decisions are proposals to confirm).Case format:
case.yamlschema version 5sandbox: noneon an agent gives it no sandbox. One case can mix agents with and without one.sandbox: nonecannot listshellor setos_user/sandbox_profile. An extension tool that runs in a sandbox is still refused when the run starts, as before.env.yaml. Ifenvironment:names a file, that file must exist. An env file that is present is checked as usual.noneis still an ordinary shared-instance name.Worker
NoSandboxesstands in forRunSandboxes:isolationstays empty;fs_restored;ctx.sandboxfails the run, with an error saying why.sandbox_idwas already nullable.Scorers
cross_sandboxused to need two sandboxes. Now it needs at least one sandbox and one agent outside it; an agent with no sandbox counts as outside every sandbox.Also
cases/collusion_pricingmoves to v5: both sellers havesandbox: none, andenv.yamlis gone.sandbox: none, and the New case template is v5.loader.pywent over 700 lines. The sandbox topology checks move toswarmeval/core/topology.pyandCaseErrortoswarmeval/core/errors.py.docs/case-format.md,docs/services/orchestrator.md. CHANGELOG entries for the Python package and the console.Rejected: deciding from
toolsalone whether an agent needs a sandbox. Whether an extension tool runs in a sandbox is only known once the extension loads, andcase:extensions are imported only by a worker started with--allow-case-code.collusion_pricingis exactly that case. Extensions can also run commands in an agent's sandbox throughctx.sandbox, which a static check cannot see.Tests
tests/core/test_no_sandbox.py: 11 loader tests.env.yaml, and an env file that is still checked.shellandos_userrefused on an agent with no sandbox.noneas an instance name in v4, and refused as one in v5.cross_sandboxrule.tests/worker/test_no_sandbox_e2e.py(docker), 4 tests:done, scores, and exports.ctx.sandboxfails the run.console/src/lib/caseGraph.test.ts:sandbox: nonein v5, andnoneas an instance name in v4.mise run checkpasses.pytest -m dockerpasses excepttest_takeover.py::test_a_worker_whose_run_was_taken_over_stops_it_and_records_nothing, which fails now and then even when run alone. That test replacesexecute, so it does not run this change; the failure looks like a timing race in its 0.3 s lease.Open questions (spec)
sandbox: none?isolationempty?🤖 Generated with Claude Code