Post

If you run two coding agents on the same machine, they will fight over the same Android emulator — or worse, install a test APK onto the phone you just plugged in to charge. Android Traffic Control (ATC) is here: orchestrate agents access, fairly & robustly! Needs Node >= 20 github.com/rock3r/atc

github.comGitHub - rock3r/atc: Daemonless Android emulator and physical device leases, warm-affinity wait queue, snapshots, and multi-agent guardrails around the official android CLIDaemonless Android emulator and physical device leases, warm-affinity wait queue, snapshots, and multi-agent guardrails around the official android CLI - rock3r/atc

1 repost10 likes

In ATC, agents claim by profile — not hardcoded AVD names — and restore QEMU snapshots in ~1.5s: atc claim --type phone --api ">=35" --play --snapshot-load logged_in atc exec -- ./gradlew connectedCheck atc free Injects ANDROID_SERIAL + --device and renews the lease every 15s. No more mis-deploys!

No cold-boot thrashing or OOMs: • Warm-affinity queue batches jobs on warm AVDs within a 120s window without starving cold configs • Pre-flight RAM & disk admission checks • Targets emulators by default — your charging USB phone is never hijacked (unless you want it to be :P)

No daemon, no npm deps: • Atomic lock (atc.lock) with <20ms in-memory critical sections — zero subprocesses ever run under the lock • 6-tier session identity across ephemeral subshells • Dead-PID GC & 5s offline grace reclaim orphaned leases automatically

Ready for every agent, and for humans: • PreToolUse/Stop hooks block raw adb/emulator collisions, rewrite to `atc exec`, and free leases on the turn end • Built-in `atc guide` + plugins for Claude Code, Codex, Gemini CLI, Antigravity, Cursor & Pi • Bundled docs, searchable without wasting context

The charging-phone failure mode is the one that actually scares me. Claim by profile plus a lease that expires beats hardcoding AVD names, because the next agent will invent a new name and still find your USB device. Defaulting targets to emulators is the copyable rule.