Why give the agent its own Mac
- It is macOS. Swift, clang,
codesignand Apple's other tools run only there. An agent working on a Mac app or a Swift package can build and test what it writes. - It is not your computer. The agent works as
renterin a fresh virtual machine. Your files, keychain and browser sessions are not on it, so a wrong command costs a rented machine, not your own. - It keeps running. The machine stays on when you disconnect. Start the agent in tmux, come back hours later, and see what it did.
- It is gone afterwards. The machine is erased when the lease ends, with whatever the agent installed or left behind.
Set it up in about three minutes
A leased machine starts with macOS only. NVTO recipes are short open-source scripts that install what an agent needs, at the versions you choose. Connect over SSH (nvto-connect open <lease-id>, then ssh nvto- and the first eight characters of the lease ID), download them, read them, and run them:
for r in dev-tools node tmux coding-agents agent-context; do
curl -fsSLO https://raw.githubusercontent.com/nvtohq/recipes/main/recipes/$r.sh
done
bash dev-tools.sh # Command Line Tools and Homebrew
bash node.sh 22 # Node.js 22, or the version you need
bash tmux.sh
bash coding-agents.sh claude codex
bash agent-context.sh # tells the agent about this machine| Recipe | What it installs | First run |
|---|---|---|
dev-tools.sh | Apple's Command Line Tools (about 1 GB) and Homebrew | 99 s |
node.sh 22 | Node.js 22 through fnm | 10 s |
tmux.sh | tmux | 24 s |
coding-agents.sh | Claude Code and Codex CLI | 33 s |
agent-context.sh | The nvto-machine skill for both agents | 1 s |
Downloads go through the machine owner's line, which the owner limits, so a slower line takes longer. Running a recipe again changes nothing already installed. Details are in Set up your machine.
Sign in with keys you can revoke
Run claude or codex in a project folder and follow its sign-in. Claude Code needs a paid Claude plan or an Anthropic Console account; with an ANTHROPIC_API_KEY in the environment it can use that key instead. Codex signs in with ChatGPT or an OpenAI API key.
The Mac's owner can reach the running machine. So treat every credential you put on it as one you may have to revoke:
- Use an API key made for this machine, with a spending limit, rather than your main account.
- Give the agent a Git token scoped to the one repository it works on.
- Keep keys in an environment variable or in
~/Private, the encrypted disk image NVTO Connect unlocks. Not in the macOS keychain: these machines log in by themselves, so the keychain opens by itself too. - Revoke them when the lease ends.
Start it in tmux and let it work
tmux new -s agent # then run claude or codex in it
# Ctrl-b then d leaves it running; disconnect as you like
tmux attach -t agent # later, from a new SSH sessionAsk the agent to commit and push to a remote as it goes. The machine is erased when the lease ends, and it can go offline if its owner's Mac does; offline time is not charged, but the work on it is out of reach until it returns.
Tell the agent where it is
agent-context.sh installs the nvto-machine skill for Claude Code and the same text in ~/.codex/AGENTS.md for Codex. It tells the agent the facts that change how it should work here:
- it is
renter, an administrator withsudo, on a machine erased at the end of the lease; - the network is IPv4 only, local and private addresses are unreachable, and mail ports 25, 465 and 587 are closed, so it should send mail through an HTTPS API;
- the owner limits bandwidth, so it should not fetch what it does not need;
- secrets belong in
~/Private, not the keychain.
What this setup does not cover
The Command Line Tools build macOS command-line programs and Swift packages. Apps for iPhone and iPad need Xcode, which you install from Apple with your own Apple Account in the remote desktop; see building iOS apps from Windows or Linux. For agents that drive macOS apps through Accessibility, or that should restart themselves with launchd, see running an AI agent on a rented Mac.
A rented Mac is a machine to work on, not a network exit. Under the acceptable use policy, an agent must not use it as a proxy or VPN, scan or attack other systems, or send spam.