# Shopify gives its AI agent River remote mobile dev machines

> Original title: 给 AI Agent 一台「远程手机开发机」：Shopify 如何用 Remote Dev 跑并行移动端

- Source: meng shao
- Published: 2026-10-24T01:07:54.000Z
- Bad Influence: https://badinfluence.news/items/yomi2ua2eiyf4xxobt0nbtmbe
- Original: https://x.com/shao__meng/status/2113799609671909827

## Summary

Shopify gave its Slack-based AI agent River a Remote Dev setup with remote Mac fleets and Android emulators on Linux VMs. The share of merged mobile PRs authored by River rose from about 6% to about 61%, according to the post. The post also describes a warm pool that cut cold starts from over 30 minutes to a few minutes.

## Why it matters

The post explains how Shopify built remote Mac and Android environments for agents, including the warm pool that cut setup from over 30 minutes to minutes.

## Post

给 AI Agent 一台「远程手机开发机」：Shopify 如何用 Remote Dev 跑并行移动端

Shopify 为 Slack 里的 AI Agent「River」搭了 Remote Dev：远程 Mac 机群 + 挂载 Linux 上的 Android 模拟器，让 Agent 并行编译、测 iOS/Android、截图录屏甚至做 Live Preview；合并的移动端 PR 中由 River 产出的比例从约 6% 提到约 61%。
https://shopify.engineering/remote-dev

为什么要做
Web/后端已能靠 River 在远端干活；移动端一开 3–4 条 Agent 工作流，本机就被编译器、模拟器吃满，合上盖还直接断。River 跑在 Linux 上：能改 Swift，但真正 build/test iOS 仍得回到那台已被打满的 Mac。委托能力超过了本机算力，于是做 Remote Dev。

能做什么
· 并行：一条 River 会话独占一套环境——可同时修 Android、做 iOS 功能、测 PR。
· 后台自治：改代码、编译、跑测、操作模拟器、截图、开 PR；失败则看日志再修。还可夜间自动捡 bug → 修 → 测 → 提 PR。
· 可验证：不止「能编译」；Agent 在真模拟器里点 UI、录 before/after；最近还能把录屏做成带 3D 手机框、动画和旁白的讲解视频。
· 谁都能参与：Web 工程师、设计师、PM 可经 Slack 动移动端，不必本地配 Xcode/Studio。

Live Preview
远程 iOS Simulator / Android Emulator 经 WebSocket 推到 Quick 站点；浏览器看实时画面并把操作回传。每会话自动有双端预览，可分享多人同看；支持 deep link 与 mobile CLI 直播。无需本机安装、无需 Mac。

怎么建（工程要点！）
1. 机群：远程 Mac 装好开发环境与 iOS 模拟器；Agent 经 SSH 接入。
2. Android：云 Mac 不支持嵌套虚拟化 → 把 Android 模拟器放在 开了嵌套虚拟化的 Linux VM，再挂到同一 SSH 会话。
3. 热池：冷启动（checkout 巨型 monorepo + 首次编译）曾超 30 分钟 → 改为预热池：main 已 checkout、工具已装、App 已编、缓存热；Agent 认领后同步分支、挂上预构建 Android VM。到「在设备上看改动」压到几分钟。
4. 轮换：会话结束销毁并补机；空闲机定期刷新 main 与重建；错开轮换保可用。
5. 教 Agent：写 skill + 封装 SSH 的 CLI；长任务用 tmux 让 River 实时观察，而不是 sleep/超时瞎等。早期 Agent 会「忘记远程 Mac」或长时间沉默，靠迭代 skill 修好。

组织侧：习惯与采纳
问题不只是技术，还有心理：大家习惯本地摸模拟器；早期 River「慢、编不过、不好用」→ 退回本地。他们用角色化「River 终于有了 Mac」的内部广告（仿 Mac vs PC）推采纳。数据：River 产出的合并移动端 PR 占比 6% → 61%。

自我改进环
River 默认多人可见。用便宜分类模型 Jev 观察移动端对话、打标签、按结果好坏归类，失败案例再喂给 LLM 找改进；用 River 自己迭代体验。

展望
实时健康监控 → Agent 自动开修 crash 的 PR；多 Agent 并行 bug bash（多商家、设备、语言、流程）。

## AI translation

Giving AI Agents a "Remote Mobile Dev Machine": How Shopify Runs Parallel Mobile Development with Remote Dev

Shopify built Remote Dev for River, its AI Agent in Slack: a fleet of remote Macs with Android emulators hosted on Linux, letting the Agent compile in parallel, test iOS/Android, take screenshots and recordings, and even run Live Previews. The share of merged mobile PRs produced by River rose from about 6% to about 61%.
https://shopify.engineering/remote-dev

Why build it
River could already do Web/backend work remotely. But once mobile ran 3–4 Agent workflows at a time, local machines were overwhelmed by compilers and emulators, and closing the laptop lid disconnected everything. River runs on Linux: it can edit Swift, but actually building and testing iOS still meant going back to that already-maxed-out Mac. Delegation had outgrown local compute, so they built Remote Dev.

What it can do
· Parallelism: each River session gets its own environment, so it can fix Android, build an iOS feature, and test a PR at the same time.
· Autonomous background work: change code, compile, run tests, operate the simulator, take screenshots, open PRs; on failure, read the logs and fix. It can also run overnight, picking up bugs → fixing → testing → opening PRs.
· Verifiable results: it's not just "it compiles"; the Agent taps through the UI in a real simulator and records before/after. Recently it can also turn recordings into explainer videos with 3D phone frames, animation, and narration.
· Anyone can participate: web engineers, designers, and PMs can drive mobile work through Slack without setting up Xcode/Studio locally.

Live Preview
The remote iOS Simulator / Android Emulator streams over WebSocket to a Quick site; the browser shows the live screen and sends interactions back. Each session automatically gets a dual-platform preview that can be shared for multiple people to watch together, and it supports deep links and live broadcasting via the mobile CLI. No local installation or Mac required.

How it's built (engineering essentials!)
1. Fleet: remote Macs have the development environment and iOS simulators installed; Agents connect via SSH.
2. Android: cloud Macs don't support nested virtualization, so the Android emulator runs on a Linux VM with nested virtualization enabled, attached to the same SSH session.
3. Warm pool: cold starts (checking out a huge monorepo plus the first build) once exceeded 30 minutes, so they moved to a warm pool: main is already checked out, tools installed, the app already built, caches hot. When an Agent claims a machine, it syncs the branch and attaches a prebuilt Android VM. Time to "see the change on a device" dropped to a few minutes.
4. Rotation: when a session ends, its machine is destroyed and replaced; idle machines periodically refresh main and rebuild; rotations are staggered to keep capacity available.
5. Teaching the Agent: they wrote a skill plus a CLI wrapping SSH; for long tasks they use tmux so River can watch in real time, rather than sleeping or waiting on timeouts. Early Agents would "forget the remote Mac" or go silent for long stretches, which was fixed by iterating on the skill.

Organizational side: habits and adoption
The problem wasn't only technical; it was also psychological. People were used to poking at simulators locally. Early on, River was "slow, failed to compile, hard to use," so people went back to local work. To drive adoption, they ran an internal ad campaign, "River finally has a Mac" (modeled on the Mac vs PC ads). The result: the share of merged mobile PRs produced by River rose from 6% to 61%.

A self-improvement loop
River is visible to many people by default. A cheap classification model, Jev, observes mobile conversations, tags them, and groups them by outcome; failure cases are then fed to an LLM to find improvements. River itself is used to iterate on the experience.

Outlook
Real-time health monitoring → the Agent automatically opens PRs to fix crashes; multiple Agents running parallel bug bashes (across merchants, devices, languages, and flows).

![](https://badinfluence.news/api/img-proxy?u=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHVW5hkjbMAEhn1d.jpg&mode=thumb&exp=1793404800&sig=d3e465bb63feea1b)

## Quoted post @mustafa01ali

> Local machines had become a bottleneck for agentic mobile development at @Shopify, so we gave agents their own remote dev environments. They now author 61% of our merged PRs 🧵

https://x.com/mustafa01ali/status/2113269013694271940
