DEV Community

Pawel Jozefiak
Pawel Jozefiak

Posted on • Originally published at thoughts.jock.pl

I Gave My AI Agent Its Own Computer. Here's Every Lesson From 72 Hours of Migration.

I gave my AI agent its own computer. Moving it from my MacBook to a dedicated Mac Mini took 72 hours and broke things I didn't know could break.

For eight months Wiz ran on my MacBook. It worked, but every time I closed the lid, the agent went offline. Every personal task competed with the agent for compute. The laptop fan ran constantly. I kept thinking: this thing needs its own hardware.

So I bought a Mac Mini M4 and moved everything. This post is what actually happened.

Here's what nobody tells you about running an AI agent headless (no monitor attached):

Every hardcoded path breaks. 340 configuration files, scripts, and settings contained my old username. The agent caught most of them by tracking its own errors. It took two hours of automated find-and-replace and one manual review pass.

Display is not optional. macOS refuses to capture screenshots without a display. Screen sharing, UI automation, all the browser-based tasks -- everything fails silently with no monitor. The fix: BetterDisplay creates a virtual display that macOS treats as real. Took four hours to discover this.

Networking gets complicated fast. Local IP, Tailscale IP, hostname resolution, SSH config, remote access from coffee shops. The Mac Mini sits behind a router with no port forwarding. Tailscale handles the mesh. Now I can SSH in from anywhere.

iMessage on a second Apple ID changes how the agent communicates. The agent runs as a separate user. That means a separate Apple ID, a separate iCloud, a separate Messages inbox. Setting up two-way communication required custom scripts to bridge the accounts.

The result is worth it. The agent runs 24/7. My laptop is free. The Mac Mini uses about $15/year in electricity. The agent has processed thousands of tasks since the migration with no manual restarts.

72 hours of chaos for a permanently better setup. The full post has every specific fix, every command, every error message and what resolved it.

Full post: https://thoughts.jock.pl/p/mac-mini-ai-agent-migration-headless-2026

Newsletter on AI agents and practical automation: https://thoughts.jock.pl

Top comments (1)

Collapse
 
apex_stack profile image
Apex Stack

The BetterDisplay discovery is the kind of lesson that only comes from actually doing the migration — there's no docs page titled "macOS silently breaks all UI automation without a display" and yet it's a complete blocker. That four-hour rabbit hole probably saved other people reading this post the same pain.

I run 10+ scheduled AI agents that handle everything from checking Google Search Console and Yandex Webmaster to cross-posting articles across Dev.to, Medium, and Hashnode. They all run in sandboxed VMs rather than on dedicated hardware, but I hit the exact same class of problems: hardcoded paths that break across environments, browser automation that fails silently when the rendering context changes, and networking quirks when agents need to reach external APIs through proxied connections.

The 340 config files with hardcoded usernames is painfully relatable. I've started treating agent environments as cattle-not-pets — every path is relative or env-var driven, every credential is injected at runtime, nothing assumes the hostname. It adds setup overhead but means I can spin up a new agent instance without a two-hour find-and-replace session.

The $15/year electricity cost is the detail that sells this. Curious whether you've hit any thermal throttling issues with the M4 Mini under sustained agent workloads, or if the efficiency cores handle the idle-but-always-on pattern well enough that it stays cool without active management.