Skip to content

feat: support cloud devices in agent CLI runs - #431

Open
sleynsol wants to merge 1 commit into
mainfrom
feat/cloud-agent-cli
Open

feat: support cloud devices in agent CLI runs#431
sleynsol wants to merge 1 commit into
mainfrom
feat/cloud-agent-cli

Conversation

@sleynsol

@sleynsol sleynsol commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add native mobilerun run --cloud support using an injected CloudDriver
  • accept cloud device UUIDs through -d/--device or --device-id
  • keep the cloud API URL separate from LLM provider URLs with --cloud-base-url
  • reject incompatible local transport and backend flags in cloud mode
  • skip local ADB keyboard cleanup after cloud runs
  • document cloud login, direct control, and local-agent cloud workflows

Testing

  • uv run pytest -q — 630 passed, 6 subtests passed
  • uv run ruff check . — passed
  • black==25.9.0 --check on changed Python files — passed
  • git diff --check — passed
  • uv run bandit -r mobilerun -q — reports the existing repository baseline findings; no new finding was introduced by these changes
  • uv run safety scan --output screen — could not run non-interactively because Safety requires account login

Manual verification

  • verified mobilerun run --help exposes --cloud and --cloud-base-url
  • successfully ran a local Mobilerun agent against a cloud iPhone and executed a CloudDriver-backed Home action
  • verified existing direct cloud device listing, screenshot, UI state, and control commands continue to work

@sleynsol
sleynsol force-pushed the feat/cloud-agent-cli branch from 9462445 to 8e0985d Compare September 1, 2026 15:43
Comment thread mobilerun/cli/main.py
raise ValueError("--cloud and --ios are mutually exclusive")
if tcp:
raise ValueError("--cloud and --tcp are mutually exclusive")
if config.device.control_backend:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave the comment about difference pls

@RasulOs RasulOs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Codex

Comment thread mobilerun/cli/main.py

from mobilerun_core_local.driver.cloud import CloudDriver

injected_driver = CloudDriver(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex review — [P2]: Cloud runs do not enable CloudDriver’s built-in stealth mode. This constructor leaves stealth at its default value of false. The generic wrapper later delegates cloud tap and swipe operations back to this driver, so requests are sent without stealth enabled even when config.tools.stealth is true. Please pass the configured value to CloudDriver, or otherwise wire cloud stealth explicitly, and add a regression test.

Comment thread mobilerun/cli/main.py
goal=command,
llms=llm,
config=config,
driver=injected_driver,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex review — [P1]: Combining --cloud with an external agent can target the wrong device. The user selects a cloud device, but external agents only support locally connected ADB devices, so the task may run on the first local Android device instead. I reproduced this behavior. Please either reject this combination with a clear error or extend the external-agent contract to accept a DeviceDriver, and add a regression test.

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