Remote runs
Push a run onto another machine and let it execute there over SSH, streaming output back — same agents run, one extra flag.
Offload a run
--host <name> (alias --device <name>) dispatches the run onto a registered machine over SSH instead of running locally. The target can be a registered device or an ad-hoc user@host:
agents run claude "run the full test suite" --device mac-mini
agents run codex "profile the hot path" --host muqsit@1.2.3.4Working directory
--remote-cwd sets where the run executes on the target:
agents run --device mac-mini --remote-cwd ~/app "run the full test suite"Detach and reconnect
--no-follow dispatches detached and returns immediately. Track it later through the host task log:
agents run claude "long refactor" --host mac-mini --no-follow
agents hosts ps # list dispatched host tasks
agents hosts logs <id> -f # follow a running oneTeammates on other machines
Any team teammate can run on another machine — pass the same flag on teams add:
agents teams add fix claude "fix the flaky test" --host mac-miniAdvanced: agent-host pools
Beyond targeting one named machine, agents hosts is an optional offload pool. Enroll machines with capability tags, then dispatch to any healthy host that matches instead of naming one:
agents hosts add gpu-1 muqsit@gpu-1 --cap gpu # enroll a host, tag it 'gpu'
agents hosts list # enrolled + ssh-config hosts
agents hosts check gpu-1 # probe: reachable? agents-cli version?
agents run claude "train the eval" --host gpu --any # any healthy host tagged 'gpu'Watch dispatched work with agents hosts ps and agents hosts logs <id>. Use the pool when you want load-balanced fan-out across many machines; use a named --device when you want one specific box.
Related
- Devices overview — the one-flag model.
agents run— the local run shape.- Teams — parallel agents, some local, some remote.
- Cloud dispatch — offload to managed cloud pods instead of your own machines.