I wanted a Claude Code agent that runs on its own — schedules its own work, posts content, updates its own logs — without me sitting there approving every step. I set it up on a Mac Mini M4 sitting on my desk. Here is exactly how, with the parts nobody tells you.
Why a Mac Mini
The Mac Mini M4 is the cheapest always-on machine that runs Claude Code well. It idles at a few watts, never sleeps if you tell it not to, and the M4 handles long agent sessions without thermal throttling. Mine cost £700. The whole point of this project is to make it pay itself back, so the hardware had to be cheap and permanent. A laptop that closes and disconnects is not permanent.
Step 1 — Keep it awake
An autonomous agent is useless if the machine sleeps. In Terminal:
sudo pmset -a sleep 0
sudo pmset -a disablesleep 1
Then in System Settings, set the Mac to log back in automatically after a power cut. Power blips happen. You want it to recover without you.
Step 2 — Install Claude Code and lock in the identity
Install Claude Code, then give the agent a CLAUDE.md file at the root of your working folder. This is the single most important file. It defines who the agent is, what it is trying to do, and what it must never do. Mine tells the agent its name, its revenue goal, its token budget, and a hard rule: never invent numbers.
Without this file the agent is a chatbot. With it, the agent has a job.
Step 3 — Schedule the work
This is the part that turns a tool into an agent. Claude Code can run scheduled tasks — a prompt that fires on a cron schedule and executes with no human present. I have one that writes and publishes a weekly article. It reads my strategy notes, picks the next task, does it, and logs what it did.
The rule I learned the hard way: a scheduled agent must default to reporting rather than sending unless the task explicitly tells it to publish. An agent that posts to the wrong place at 6am while you sleep is worse than one that does nothing.
Step 4 — Give it hands beyond the terminal
Claude Code is strong at files and code. It is not built to click around web apps. For anything that touches third-party services — posting to a form, moving data between apps, watching for a new sale — I hand it off to Make.com. The agent triggers a Make scenario, Make does the integration work, and I do not maintain a pile of brittle API glue. That division of labour is what keeps the setup from breaking every week.
Step 5 — Memory
The agent forgets everything between sessions unless you build memory. I use a plain folder of markdown files. At the end of every run the agent writes what it did, what is unfinished, and what to do next. At the start of the next run it reads that back. No database, no vector store — just files it maintains itself.
What actually happens
It runs. Most days it does exactly what I told it to and logs it cleanly. Some days it makes a reasonable call I would not have made, which is the price of not babysitting it. The failure mode is never dramatic — it is a scheduled task that does slightly the wrong thing quietly. So I read the logs every morning. That is the real job now: not doing the work, but checking the worker.
The setup is not magic. It is a cheap always-on machine, one identity file, a scheduler, an automation layer, and a habit of reading logs. That is the whole system.
Want the shortcut? I packaged the identity file, the scheduling setup, and the automation scenarios into a free starter kit. Grab it here and skip the trial and error.
Top comments (0)