Why one developer gives AI coding agents their own computer
A dev.to guide argues that long-running coding agents belong on a separate machine with separate credentials, and lays out four ways to set that up.
The short version
- Agents run commands with your permissions, next to your SSH keys, browser sessions and other projects.
- Four options: a Linux server, a container on your machine, a spare Mac, or a rented Mac.
- Give the agent its own Git token and its own API key with a spending limit.
- Use tmux so the agent keeps working after you disconnect, and have it work on a branch.
- The author sells Mac rentals through JustMac and says so up front.
Why it matters
Coding agents are moving from short suggestions to hour-long unattended jobs, and that raises the cost of a mistake. The post's core idea works at any budget: keep the agent away from your personal accounts, so the worst case is revoking one token instead of cleaning up your whole digital life.
The problem with your own laptop
As dev.to reported, a developer who builds a Mac-rental service has written a guide to a question many people now face: where should an AI coding agent do its work? Tools like Claude Code and Codex are strongest on long tasks. You give them a goal such as adding an offline mode, writing tests and getting the build to pass, then come back an hour later to review.
Most people start by running the agent on their everyday computer. The author lists four problems that appear quickly. The agent stops when the laptop sleeps, so you cannot close the lid. It runs shell commands with your user's permissions, beside your SSH keys (the files that prove who you are to servers), browser logins and every other project on the disk.
The other two are practical. Builds, tests and simulators eat processor power and battery while you try to work. And agents install packages and change settings, so the machine slowly drifts away from a clean state.
The proposed fix is simple: give the agent its own computer.
Four places an agent can live
The post compares four options and is open about the trade-offs.
- A cheap Linux server. Providers such as Hetzner and DigitalOcean rent one for a few dollars a month. It suits web apps, backends, scripts and data work, but not anything that needs Apple tools like Xcode, the iOS Simulator or Safari.
- A container or sandbox on your own machine. A container is a walled-off environment on your computer. It is free, fast and reduces risk while you sit at the machine, but your laptop still has to stay on for long unattended runs.
- A spare Mac at home. An old Mac mini on a shelf works well if you own one. The catch is reaching it securely from outside your home network.
- A rented Mac. You rent a physical Mac in a data center and connect remotely. Named providers include MacinCloud, MacStadium, AWS EC2 Mac instances and the author's own JustMac.
The rented Mac makes sense when the agent needs macOS itself, for example to build iOS apps or test in the Simulator. It is a poor fit for round-the-clock use over many months, where buying hardware gets cheaper. Because Apple's licence requires a minimum lease of 24 hours, rentals are billed by the day, week or month.
Setting it up in outline
The steps apply to any Mac you control. You install a few basics, including Git and Node.js, plus tmux. If you build for Apple platforms you also install Xcode using your own Apple Account. Then you install the agent with its one-line install command and sign in with your own subscription or API key.
Before handing over a task, the author suggests cloning the project and confirming that its dependencies install and its tests run. An agent that has to repair a broken environment spends a lot of tokens, the units AI services bill by, on the wrong problem.
Next comes tmux, a tool that keeps a terminal session alive after you disconnect. You start the agent inside it, give it the task, detach, and later reattach from any computer to see how far it got.
Finally, ask the agent to work on its own branch and commit as it goes. You then review the result like any normal code contribution, with a branch and a test report instead of a laptop you are afraid to close.
Credentials are the important part
The author calls separate credentials the most important step and the one people skip most often. Do not reuse your personal logins on the agent machine. Create a Git token limited to the repositories the agent needs. On GitHub, that means a fine-grained personal access token, a key scoped to one or two repositories.
If you use an API key, make a dedicated one for this machine and set a spending limit on it. Stay out of your personal email, password manager and browser profile there. If something goes wrong, you revoke one token and one key, and your main accounts are untouched.
Cleanup matters too. When the job ends, push the branch, revoke the temporary token and key if you will not reuse them, and sign out of your Apple Account in Xcode. The author says JustMac erases a rented Mac to factory settings an hour after the rental ends. On your own hardware, that cleanup is your job.
How to read the advice
The author discloses that he builds JustMac, so the recommendation for a rented Mac comes from someone with a stake in it. In fairness, the post also steers readers toward a cheap Linux server, a sandbox, a spare Mac or buying a Mac mini, depending on the situation.
His summary table is easy to apply. Web or backend work with no macOS need points to a Linux server. Staying at the computer while the agent works points to a container. Owning a spare Mac means using it. iOS or macOS work needing Xcode points to a rental. Daily agent work for months points to buying a Mac mini.
The lasting point does not depend on any product. An agent that can run commands deserves its own machine and its own keys. Even without new hardware, the same thinking applies to a separate user account, a virtual machine or a throwaway cloud server.
What to watch
- Whether more coding agents ship built-in sandboxing, so isolation needs less manual setup.
- Whether renting a Mac by the day stays cost-effective compared with buying a Mac mini for steady use.
Try it
Check which accounts you are signed into on the machine where you run coding agents. Then create a Git token limited to one repository and an API key with a spending limit, and use only those for the agent.
Sources and links
- Reportingdev.to: the article we sourced
Liked it? Say why
Add a line for other readers.
No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.
Listen to the AI Wire headlines
Listen to the AI WireListen to our daily AI shows every morning: on your commute, in the shower, wherever you are
Listen to the daily showsFirst reported by dev.to · Read the original. Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.
