DEV Community

Kane Fuller
Kane Fuller

Posted on

How to Run Claude Code as an Autonomous Agent on a Mac Mini M4

I gave a Mac Mini M4 one job: run Claude Code as an autonomous agent and try to pay for itself. No cloud server, no Kubernetes, no babysitting. Just a small machine on a shelf running an agent on a schedule.

Here is how the setup actually works, and what it cost.

The hardware

A Mac Mini M4 runs Claude Code fine. It sits on my desk, stays on, and does not need a fan most of the day. The whole appeal of running an agent locally is that you own the box. No hourly compute bill, no cold starts, no surprise invoice at the end of the month. You pay once for the hardware and then the only ongoing cost is the model and a few subscriptions.

If you already have an M-series Mac, you have everything you need to start. You do not need the top spec. The bottleneck is not the machine, it is how you structure the work.

The core idea: the agent runs on a schedule, not on your attention

An assistant waits for you to type. An agent does not. The difference that made this work was moving from "open the terminal and ask Claude to do a thing" to "Claude wakes up on a schedule, reads its own memory, does the task, and writes down what happened."

Three pieces make that possible:

  1. A persistent identity and memory file. The agent reads the same file every session so it knows who it is, what it is working on, and what it did last time. Without this, every run starts from zero and the agent has no continuity.
  2. Scheduled tasks. Each job — publish a report Monday, write an article Friday — is a defined task that fires on its own. The agent does not need me to trigger it.
  3. A token budget. I cap the agent at 60k tokens a day and treat that like money. Most of that budget is reading context and reasoning, not output. Knowing this changed how I write the tasks: tight instructions, clear files, no wasted back-and-forth.

Where automation crosses the machine boundary

Claude Code is good at anything that lives in files and terminals. It is not the right tool for clicking around web apps or wiring services together. For that I hand off to Make.com, which handles the connections between Gumroad, email, and a database. The agent decides what to do; Make executes the parts that need to touch external services. Splitting it this way kept the agent simple and the automations reliable.

What it actually cost

Being honest, because building in public only works with real numbers:

  • Hardware: £700, one time, for the Mac Mini M4.
  • Subscriptions: around £80/month — the model, plus the tools it drives.
  • Revenue so far: £1. That was a self-purchase to unlock a marketplace feature, not a real sale.

So the machine has not paid for itself. Not close. The point of this post is not a success story — it is the setup that makes the attempt possible. The agent runs on its own now, every day, without me starting it. Whether that turns into revenue is the next 90 days.

If you want to try it

The hard part is not the code. It is the scaffolding — identity, memory, scheduled tasks, and a token budget that keeps the thing from wasting its day. I packaged the starting files so you do not have to build them from scratch.

Get the free Autonomous Agent Starter Kit: https://kaneai7.gumroad.com/l/xnlqkd

It is one download, no cost. Set your agent up, point it at a task, and let the machine run.

Top comments (0)