- All playbooks
- Keep prepared environments ready for agent work
Keep prepared environments ready for agent work
Move repeated provisioning and setup into prepared environments so agent sessions can start from a usable workspace.
How companies used this technique
Read what each company changed and follow the original sources.
Run agent builds and tests in isolated cloud sandboxes that start in seconds
Translated to GitHub Actions
- What DoorDash built
- Flux, DoorDash's cloud agents platform, runs each task in a Firecracker microVM sandbox, with a p95 service-level target of under five seconds for full setup.
- Your GitHub Actions version
- Run agent builds and tests in isolated, short-lived runners provisioned with the repositories and tools each task declares.
Flux, DoorDash's cloud agents platform, runs each task in a Firecracker microVM sandbox provisioned with the repositories, developer tools, secrets and runtime dependencies it needs, so builds, tests and large searches run in parallel and unattended. Its 95th percentile objective for full setup, from starting the microVM through cloning repositories, installing build tools and configuring the coding agent, is under five seconds. Each playbook declares the tools it needs, and DoorDash's Agent Gateway exposes only that approved set. In one month of 2026, Flux automated 130,000 engineering tasks.
- Use it when
- Agents run builds and tests on developer laptops, or each agent job spends minutes cloning and installing before it starts work.
- Before applying it
- Fast sandbox setup depends on prebuilt images and warm repository caches; measure setup time as its own number and keep secrets scoped per task.
- GitHub Actions adaptation
- Compare the source system with your own workflow before applying this translation.
Keep warm, prebuilt machines ready for agent sessions
Translated to GitHub Actions
- What Shopify built
- Shopify's Remote Dev keeps a pool of warm Macs, with main checked out, tools installed and apps built, for each River agent session.
- Your GitHub Actions version
- A pool of warm, prebuilt machines that an agent claims, syncs to its branch and replaces when its session ends.
Shopify's Remote Dev gives each River agent session its own environment, so several agents can build and test mobile apps in parallel without maxing out a laptop. Preparing a Mac after a request arrived meant initial app compilation and the main checkout took over 30 minutes. Shopify now keeps a pool of warm Macs: main checked out, tools installed, apps built and caches warm. An agent claims a Mac, synchronizes its branch and runs its scripts and builds there. Each Mac is destroyed when its session ends and replaced, and idle Macs are refreshed on a staggered rotation that pulls fresh main and rebuilds the apps and caches. As context, River's share of merged mobile pull requests grew from 6% to 61% in 2026, as Shopify's broader River rollout, including internal advocacy, increased adoption.
2026: The time from requesting a Mac to inspecting code changes on a running device went down to just a few minutes. Source
- Use it when
- Each agent or CI session spends a long first step on checkout, install and build before it does any work.
- Before applying it
- Idle machines in the pool cost money and need refreshing from main on a schedule, so size the pool to the sessions you run.
- GitHub Actions adaptation
- Compare the source system with your own workflow before applying this translation.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed