Skip to content

REMOTE-2925 Add --computer-use-model to warp agent run - #15289

Draft
warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
factory/computer-use-model-flag
Draft

REMOTE-2925 Add --computer-use-model to warp agent run#15289
warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
factory/computer-use-model-flag

Conversation

@warp-agent-staging

Copy link
Copy Markdown
Contributor

Description

Adds --computer-use-model <MODEL> to warp agent run (hidden, alongside the existing --computer-use / --no-computer-use flags) and plumbs it through agent-run setup so it overrides the AI execution profile's computer_use_model when the client builds model_config.computer_use_agent for MAA requests.

Today cloud runs use the default CLI profile, where computer_use_model is None, so the computer use (CU) subagent always falls back to auto. This flag is what lets a run's configuration choose the CU model.

This is the client half of a two-repo change and must land first. warpdotdev/warp-server only emits --computer-use-model from AugmentArgsForTask once this flag exists in the agent build used by Warp-hosted workers; otherwise a run configured with a CU model would dispatch an unknown flag and fail at sandbox startup. Server-side work (run-config snapshot field, cloud run API field, named-agent defaults, factory-file computerUseModel, dispatch emission) is a separate PR in warpdotdev/warp-server.

Behavior notes:

  • Override only. With the flag absent, behavior is byte-for-byte what it is today; no GUI change and no change to profile behavior.
  • Oz-harness only: ignored when --harness selects a third-party harness, matching the design decision that the CU model is an Oz-harness sub-setting.
  • A CU model together with --no-computer-use is accepted and simply unused, matching the server-side configuration semantics.
  • The override beats the active profile, not just the CLI default profile, because the server dispatches --profile and --computer-use-model from the same run-config snapshot; an override that only touched the default CLI profile would be silently dropped whenever a profile is configured.
  • The value is forwarded verbatim rather than resolved against the client's cached CU catalog. Unknown/disallowed ids are rejected server-side (at run creation, and again by MAA's getComputerUseAgentModel), so resolving locally would silently swap a misconfigured — or newly added, not-yet-cached — model for the default.

Linked Issue

REMOTE-2925 — https://linear.app/warpdotdev/issue/REMOTE-2925/factory-configurable-computer-use-model-factory-config-cloud-run-api

Testing

Automated tests cover the full chain from flag to request settings:

  • crates/warp_cli/src/lib_tests.rs: flag parses, trims blank values, requires a value, and coexists with --no-computer-use.
  • app/src/ai/agent_sdk/mod_tests.rs: the parsed flag becomes the driver task's computer_use_model for Oz and is dropped for a third-party harness.
  • app/src/ai/llms_tests.rs: the run override wins over the profile's computer_use_model, is forwarded verbatim even when it isn't in the cached CU choices, and leaves other surfaces and the UI-facing resolution on the profile value.
  • app/src/ai/agent/api/impl_tests.rs: RequestParams::computer_use_model lands in model_config.computer_use_agent (the request-settings construction was extracted into build_model_config to make this assertable).

Commands run in the agent sandbox:

  • cargo test -p warp_cli --lib computer_use — 11 passed, 0 failed.
  • cargo clippy -p warp_cli --all-targets --all-features --tests — clean.
  • cargo fmt -p warp -p warp_cli — clean.

Not run: anything that compiles the warp app crate. cargo check -p warp --lib is OOM-killed (SIGKILL) in this 4 GB sandbox even at -j 1, so the app-crate edits and their tests (llms_tests, mod_tests, impl_tests) are unverified locally and need CI. No manual ./script/run testing for the same reason.

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Adds an agent-run override for the computer use subagent's model, so a cloud
run's configuration can pick the CU model instead of always falling back to
auto via the default CLI profile.

The flag is Oz-harness only and beats the active execution profile, since the
server dispatches --profile and --computer-use-model from the same run config
snapshot. The value is forwarded verbatim to model_config.computer_use_agent
rather than resolved against the locally cached CU choices: the run config is
authoritative and the server validates the id, so a local resolve would
silently swap a misconfigured or newly added model for the default.
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation

…maining initializer

The custom_endpoint_usage_display_label test builds LLMPreferences literally
and was missed when the field was added, so the app test binary did not
compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants