Repository navigation
feat(run): --set envs/NAME.KEY=VALUE sets env keys for one run; computer envs take tools - #510
Merged
earakely-scale merged 6 commits intoNov 6, 2026
Conversation
…ake tools agent-env run --set KEY=VALUE sets a key in every env the bundle's tasks deploy whose type takes it, or in one env as envs/NAME.KEY=VALUE, the value TOML or a bare word and the key dotted into tables. The envs it changes, the envs and tasks naming them and the evals naming those tasks are written under ids ending in the settings, leaving the bundle as written. Computer envs take tools = "standard" | "driver" | "both", which a deploy, and a reset, applies to the agents' role through the driver's tool access. Refs FD-4362 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… kind; tools before register --set takes only envs/NAME.KEY=VALUE: no kind is a default target, and other kinds can take their own folder prefix later. The env's type checks the key and value as it checks an env.toml's, so the toml_keys declarations the bare form needed are gone. Renames are keyed by kind and id, since an id is unique within its kind alone: a skill sharing an env's id stays as it is. A --task or --eval naming an entry by its id selects its variant. A computer env's tools are given before the deployment is registered or replaces the last one, so a driver that can't take them fails the deploy and leaves the earlier deployment up. Refs FD-4362 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entry's env refs with_variant returns the variant with its rename map, which the plan carries beside --agent's override: the plan line, the refusal of a selection that deploys nothing changed, and --task or --eval by id read it instead of matching id suffixes or zipping entries. Finding and rewriting an entry's env references share one walk. The bundle tests' composed fixture moves to their conftest, and store_agent to _support, in place of two copies. Refs FD-4362 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
force-pushed
the
edgararakelyan/fd-4362-m32-agent-env-run-computer-driver-and-tools-overrides
branch
from
November 6, 2026 00:00
2eb3d29 to
b352359
Compare
…nd refuses type and id An entry's references are walked through its class's refs as the resolver walks them, so an eval naming its task in a table, by name or id, is renamed and repointed like one naming it as a string. A run can't set an env's type or id: they say what the entry is, and the planner reads the type from the entry, not its toml. Refs FD-4362 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tomls --set changes are keyed by kind and id, since an id is unique within its kind alone: an eval with the env's default id, renamed because it names a task the env's change reaches, keeps its own tasks. Refs FD-4362 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and on a Modal VM tst/integration/computer/set_test.py runs the set test bundle's cua-driver desktop through agent-env run, listing what the agents' role is offered before and after a reset: each tools value (unset, standard, driver) on local Docker, a driver set for the run composed and deployed under the variant's id with the bundle's own env unwritten, and tools=standard on a Modal VM through a reset in place. run_context reads an instance id with spaces, as a variant's has. The Modal test found a disk export that failed on an arm64 machine whenever the amd64 disk's image wasn't in its Docker: docker create resolved this machine's platform, which the image's index doesn't hold. The export now creates for the disk's own platform, the one the Modal VM provider boots. Refs FD-4362 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-4362-m32-agent-env-run-computer-driver-and-tools-overrides
branch
November 6, 2026 02:19
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.
agent-env run BUNDLE --set envs/NAME.KEY=VALUEsets a key of one of the bundle's envs for one run, so a bundle can be compared across drivers, base computers or tool sets without being copied or edited. Computer envs get atoolskey, so which tools their agents see is a setting like any other.--set envs/NAME.KEY=VALUE--set envs/desktop.driver=cua-driversetsdriverin the env in folderenvs/desktop, as itsenv.tomlwould. The env name is matched against the bundle's env folders, longest first, so a name with dots works.VALUE is read as TOML, and a bare word is a string:
--set 'envs/desktop.display={ width = 1280, height = 720 }'. KEY can be dotted into a table:--set envs/desktop.computer_settings.timezone=UTC.The flag is repeatable, and settings apply in the order given.
Every setting names its target. There's no bare
KEY=VALUEform, so no kind is a default target. Other kinds can come later under their own folder prefix (tasks/…,agents/…) without overlapping this one.These are written under ids ending in the settings:
For example,
desktop(desktop.driver cua-driver, desktop.tools standard). A value an id can't hold is shown as 8 hex characters of its sha256.Other tasks and evals keep their ids. Names don't change, so
--task probestill selects the task, and a reference by name reaches the variant; a reference by id is repointed. A variant composes and reuses images like any env. The plan output says what was renamed:--set envs/desktop.driver=reference: 1 env and 1 task written under ids ending in (desktop.driver reference).Refusals before anything is written:
envs/NAME.KEY=VALUE, or whoseenvs/NAMEnames no env;env.tomlgets (the plan runs each type'saccept_toml), such as "unknown key 'drivr'; a computer env takes …";A driver and computer that can't compose are refused by the composer's gate as the run writes the env, before any task runs. A dry run writes nothing, so it doesn't catch that; that was already true of any new computer env.
The computer env's
toolstools = "standard" | "driver" | "both"gives the env's agents (thedefaultrole) one of:standard: AgentEnv'scomputer_*tools alone;driver: the driver's own tools alone;both: everything it serves. This is the default and changes nothing.ComputerEnv.deployapplies it through the driver's tool-access extension, the same onemodify_env_tool_accessuses. It runs insidedeploy_through_provider, through a newthenhook, so a driver that can't take it fails the deploy and the computer is torn down. A reset applies it again, since rebooting the computer drops the rules. A task's own tool-access steps run after it and win. The key is stored only when set, so existing env documents don't change.The drivers and computers READMEs give the
--setexamples and thetoolsvalues.Also: exporting a disk on a machine of another arch
exported_disk, which carries a computer's disk to a Modal VM, randocker createon the disk's image without naming a platform. The image's index holds the disk's own platform alone (linux/amd64), so on an arm64 machine whose Docker didn't already have the image, the create failed with "no matching manifest for linux/arm64/v8". The new Modal VM test found this. The export now creates for the disk's own platform, which the Modal VM provider declares indisk_image_platforms.Not in this PR
--repeat, and running the combinations that work while refusing the rest come with M3.3. Changing several envs, such as every computer env of a bundle, takes one--seteach for now.tools. That's a follow-up in the website repo.Verified
Unit tests:
tst/unit/bundle/variants_test.py: renaming and what stays, repointing by id, TOML and bare values, dotted keys, an app change renaming the computer env, every refusal (form, missing env, the env type's own key and value checks, nothing selected), a materialized variant, and the CLI dry run.test_computer_env.py:toolsat deploy and again after a reset for each value, a refused value, and a driver without tool access failing the deploy and tearing the computer down.installed_test's no-BUNDLE usage test now covers--set.Integration tests,
tst/integration/computer/set_test.py(int_test_slow). Each runs the newsettest bundle (the ubuntu-24.04 base with cua-driver) throughagent-env run, with a verifier that lists what the agents' role is offered before and after areset_env:toolsvalue against the real cua-driver on local Docker: unset (7computer_*+ 66 of the driver's own),standard(exactly the 7) anddriver(exactly the 66), before and after the reset;--set envs/desktop.driver=reference: the plan line, the variant's id and its reference driver, the bundle's own env never written, and onlycomputer_*tools offered;tools=standardon a Modal VM: deployed as a disk, the 7 tools kept through a reset in place. It is gated on theremote_sandboxcapability.Run results: the four local cases passed on the c6i.4xlarge box (2 min 24 s), where the Modal case skipped as
agentenv-capability-missing: remote_sandbox. The Modal case passed from an arm64 laptop with the CI Modal keys (2 min 32 s).End to end on the same box, local Docker:
hf://earakely-scale/cua-driver-bench --task probe --set envs/desktop.driver=referencepassed, asprobe(desktop.driver reference).desktopexample with a verifier that lists what the agents' role sees.--set envs/desktop.…computer_*toolsdriver=cua-driverdriver=cua-driver tools=standarddriver=cua-driver tools=driverdriver=cua-driver tools=standard, deploy thenreset_envtools=standard(reference driver)modal_vm(laptop as the Modal client, appagentenv-pr510). The disk was composed for amd64 on the laptop, and each env deployed onModalVmSandboxProvideras the amd64 disk:--set envs/desktop.driver=cua-driver --set envs/desktop.tools=standard: 7computer_*tools, none of the driver's own.reset_envbefore the check: 7 and 0 after the reset.tools=driver: 0 and 66.driver=cua-driverpassed.--set envs/desktop.driver=macos-harnesswas refused as the env was written: "macos-harness supports no platform ubuntu-24.04 is". A bare--set driver=xwas refused before anything was written.Refs FD-4362
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no blocking issue remains.Summary
Adds run-only env settings through
--set envs/NAME.KEY=VALUEand lets computer envs choose which tools their agents see.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A["Run with --set"] --> B["Parse and check env settings"] B --> C["Rename changed envs and dependent entries"] C --> D["Repoint references and selections"] D --> E["Plan and write the variant"] E --> F["Deploy the computer"] F --> G["Apply the env's tools choice"] G --> H["Run task steps"] H --> I["Reset the computer"] I --> GReviews (6) · Last reviewed commit: "test(run): --set and a computer env's to..." · Reviewed by Greptile