Chapter 04 of 8
The always-on setup.
If it only exists in a chat window, it doesn't exist, and if it only happens while your laptop is open, it barely happens. Backed-up projects, a second Mac that works overnight, and one shared memory make the work survive anything.
Picture the morning your laptop won't turn on. Maybe it took a coffee, maybe it just quit. If your website, your pricing tool, and a year of client notes lived only on that machine, that's a very bad day. If every one of them also lived safely online, it's an annoying hour: you sign in on a new computer, Claude downloads everything again, and you carry on where you left off.
That's the first half of the always-on setup: the work survives anything. The second half is that the work keeps going while you sleep, on a small second Mac that never closes its lid and shares one memory with your laptop. Put the three together and Claude stops being something you open and becomes something that runs.
Every project lives in a repo.#
A repo, short for repository, is a project folder with a perfect memory. Every change ever made is saved with who made it, when, and why. It lives on your computer and on GitHub, a service that stores repos online, at the same time, so it's a backup and a history in one. If Claude breaks something on Tuesday, you can roll the project back to Monday. And Claude is very good with repos, because they're how it keeps track of its own work.
Git is the tool underneath all this, and it has a reputation for being fiddly. The good news is that you never have to learn it. Claude creates the repo, saves each change as a commit (a snapshot with a one-line note about what changed and why), and pushes those commits up to a private GitHub repo, one only your account can see, so nothing important sits on only one laptop. All you do is set the rule once: every new project gets a private repo before the first line of anything is written.
Start a new project called pricing-calculator. Private repo in our company account, connected so it can publish. Build a first version from my notes, put it on a preview link, and send me the link with a screenshot at phone size.
Two small habits make this tidy. Keep every repo in a company GitHub organization rather than your personal account, so the business owns the work and giving someone access to one project never exposes the others. And keep them all side by side in one Code folder on your Mac. Claude works from that folder, so it can see and connect everything. Each repo also gets a one-page read-me for AI and people alike, saying what the project is, how it runs, and the rules for touching it, so any new hire or any other AI can start without a briefing.
Nothing goes live until you've looked.#
The diagram below is the whole path from your Mac to the internet.
For websites and web tools, the repo connects to a hosting service like Vercel, and something lovely happens. Every time Claude pushes work to a side branch (a draft copy of the project), Vercel builds a preview deployment: a private copy of the site at its own link, behind a login by default. The main branch is the live site customers see. So the rule is simple: for anything a customer will see, Claude puts it on a branch and sends you the preview. You click around on your phone, ask for changes, and only when you say "ship it" does it go live. If a release turns out badly anyway, rolling back is one click.
When you want to show a client a draft, the same idea stretches a little further: put it on a preview address of your own, hidden from Google, and send them that.
Any knowledge you want to keep is a project, and projects live in repos.
Once that clicks, you start seeing repos everywhere, not just for websites. Claude's own memory from Teaching Claude your business is a private repo. A client records repo holds one folder per client with notes, decisions, call transcripts, and copies of every email thread as plain text, so Claude can answer "what did we promise them in August?" in seconds. An operations repo holds the small scripts that keep everything running. A start-here repo is the front door: one page listing where everything lives and how to recover if the laptop is gone, written for a stranger or for a different AI. The same goes for proposals, pitch decks, data, and the backend behind an app.
If your team runs on Google Sheets, that's fine to start with. The move is to keep the logic out of the sheet. When a spreadsheet grows formulas nobody dares touch, ask Claude to rebuild that process as a small tool in its own repo that reads and writes the sheet. The sheet stays the familiar screen, and the logic gets history, tests, and an owner.
A second Mac that never sleeps.#
With everything backed up, the next question is who does the work while you're away. It's eleven at night and your laptop is closed on the kitchen table. In a closet at the office, a small silver box is still at work. All night it keeps the brain and every project fresh. Around two in the morning it walks every live website looking for broken pages, dead links, and failed updates, and fixes the easy ones. The long job you handed it before dinner finishes around four. At seven, a morning brief lands in your inbox: what happened overnight, what's due today, what's waiting on whom. The chart below lays out that night.
One night on the Mac mini
11pm to 7am. Approximate: start and end times vary night to night.
That's the Mac mini. A laptop closes, travels, and runs out of battery, so work that has to happen every night can't depend on it. The mini is a second Mac with its own Claude that simply never leaves.
Start with the same first afternoon from Getting set up, done on the mini. If you want it on its own seat, a Team plan is the clean way; before running a second personal account, check Anthropic's Consumer Terms. Plug it into ethernet and a small battery backup, because wi-fi drops and power blinks, and both kill overnight jobs. Then open the Code tab and hand Claude the rest.
This Mac mini is my always-on worker. Set it up so it never sleeps and recovers on its own after a power cut, keeps every project fresh, checks its own health, and proves every job ran. Stop only for clicks that need my hands.
Claude works through the energy settings (never sleep, start up after a power failure), adds the Claude app to the login items so it reopens after a restart, writes the small scripts that keep repos fresh and the disk tidy, and saves a record of the whole setup to the brain.
One setting it leaves alone on purpose: FileVault, the Mac's disk encryption, stays on, even here. The trade-off is real. After a power cut, the mini restarts to a password screen and no jobs run until someone unlocks it. On Apple silicon with a recent macOS and Remote Login switched on, you can unlock it from another computer on the office network; from outside the building, someone has to type the password. Don't trade the encryption away to dodge that. The battery backup makes it rare.
Reaching it from anywhere.#
The mini lives in a closet, so you'll talk to it from elsewhere. From your laptop, the path is Tailscale, a private network that links your own devices, encrypted and invisible to the internet, with no router settings to change. The Tailscale app can't act as the door itself, so the mini uses the Mac's built-in Remote Login, reached over that private network. Once that's set, the laptop's Claude can run a command on the mini as easily as on itself, and you just say "run this on the mini overnight and put the result in the brain." When the mini's Claude is stuck waiting for a click, Screen Sharing over the same connection shows you its screen.
From your phone, use Remote Control. Type /remote-control in a session on the mini, or switch on "Connect new sessions to Remote Control" in the Claude Code settings, and you can pick that live session up in the Claude app from a dentist's waiting room and answer its questions. The mini has to stay on and awake for that, which is the whole point of it. The two paths look like this.
Two ways to reach the mini
No router settings, nothing exposed to the open internet.
Prove it ran.#
The mini runs two kinds of scheduled work. Plain scripts, run as launchd jobs (launchd is the scheduler built into every Mac), do the mechanical things like syncing, pulling, backups, and checks; they cost nothing and run whenever the Mac is on. Routines are different: a Claude session with a written brief, like "every Monday, review last week's search data for each site and write up what to fix." You create them on the Routines page (New routine, then Local) or just by asking. They use your plan, and they run only while the Claude app is open and the Mac is awake. If it slept through a run, it gets one catch-up run, not all of them.
In one real cleanup, a business had sixty-five scheduled jobs written over several months. Only six had ever actually been registered to run. The rest looked finished, sat quietly in a folder, and never ran once. Nobody noticed, because a job that never starts never sends an error.
So every scheduled job gets a "prove it ran" check. A small health script runs every half hour, looks for each job's last log entry, and flags any job that hasn't checked in when it should have. Anything wrong lands in the morning brief, right next to your coffee.
Two machines, one memory.#
A second Mac brings a new risk. Two Claudes that don't share a memory are two strangers who happen to work for you. The laptop fixes a bug at four in the afternoon, and at two in the morning the mini, which never heard about it, "fixes" it right back. You tell the laptop that a client hates long emails, and the mini drafts that client a long email the next day. Nothing is broken, exactly. They just don't know what the other one knows. The goal is one mind on two machines: whatever one Claude learns, decides, or finishes, the other should know by the time it next looks up.
Each Mac has its own copy of the brain, the folder of notes where Claude keeps your rules, your clients, and what it's working on. Behind the scenes there is also a private copy online, in a GitHub account only you can see, and it acts as the meeting point. Once a minute, each Mac does three small things on its own. It saves any notes it wrote since the last minute, it picks up whatever the other Mac saved, and it sends the combined result back up. That's the whole trick. A rule you give the laptop at 4:00 is in the online copy by 4:01, and the mini's next session knows it by 4:02. You never press a button.
Two small details matter. When both machines happen to edit the same note in the same minute, the sync keeps both sets of lines rather than choosing one, which occasionally leaves a note a little jumbled, so have Claude tidy the notes once a month. And because the notes go online every minute, there is a guard that refuses to save any password or key that slips into a note. Without it, a key pasted into the wrong place would be online sixty seconds later.
The same idea covers everything else the two machines need. The mini pulls the latest version of every project every fifteen minutes, which is why the standing rule for both Claudes is to commit and push the moment a piece is done, never leave it sitting on one machine. The locked vault of keys from Teaching Claude your business syncs every ten minutes. The chart below puts all the background rhythms side by side.
How often each background job runs
Minutes between runs. A shorter bar means it runs more often.
Sharing notes only helps if Claude reads them. So every new session, on either machine, starts with a short briefing that runs automatically before you type a word. It's a SessionStart hook, a small script listed in Claude's settings file that runs as each session opens and hands its output to Claude. It pulls the latest brain and tells Claude three things: which machine it's on, what you're focused on right now, and the last dozen things either machine did. A session on the mini opens already knowing you shipped a homepage fix on the laptop an hour ago and that a client is waiting on their IT person for a domain change. "Started on the laptop, the mini finishes it overnight" is just a line in the notes about current work, and the mini picks it up when it starts. It only works if both machines open their sessions on the main Code folder, so they share the one brain instead of each keeping its own.
Watch it, because it breaks quietly.#
One day a sync crashed halfway through and left behind a small marker that means "a sync is running, wait your turn." From then on, every sync on both machines saw the marker, assumed another sync was busy, and politely skipped. Nothing showed an error. Nothing turned red. For 26 days the two Claudes drifted apart, each one confidently working from its own half of the memory.
It came to light only when one machine had never heard of a decision made two weeks earlier.
The fix was three changes, and they are worth having from day one. A marker older than ten minutes is now treated as a crash and cleared. Any half-finished sync is cleaned up before a new one starts. And a health check sends an alert if the brain hasn't synced in ten minutes, so silence gets noticed in minutes instead of weeks. It's the same lesson as the sixty-five jobs: anything that runs on its own needs something watching for the day it stops.
A sync that fails loudly is an annoyance. A sync that fails quietly is two companies.
Every so often, check on it yourself. It takes one sentence.
Check the sync on both machines. When did the brain last sync, is anything stuck, and do both Macs have the same latest notes? Fix what's wrong and tell me in three lines.
Most weeks the answer is "all good." The week it isn't, you'll be glad you asked.
Common questions.
How do I connect Claude Code to GitHub?
Ask Claude in the Code tab to set up GitHub for you. It installs a small GitHub tool, then opens GitHub in your browser with a one-time code. You type the code and click approve, and Claude handles everything after that.
Do I need to know git to use Claude Code?
No. Git is the tool that tracks changes, and Claude runs it for you. It saves changes, writes a short note for each one, and uploads them to GitHub. You only need to know that a repo is a project folder backed up on GitHub.
What does the setup request do?
It's one plain-English request you give Claude in the Code tab on a new Mac. Claude installs the basic tools it needs, signs you in to GitHub, builds its own memory, and sets up a small job that backs that memory up. You click Allow on a few popups and type your passwords yourself.
How do I publish a website Claude built?
Connect the website's GitHub project to a host such as Vercel once. After that, every draft gets its own private preview link, and the main version is the live site. Ask Claude to send you the preview link before anything goes live.
Can two Claude sessions work on the same project at once?
Yes, if you turn on the worktree option for each session in the Code tab. A worktree is a separate copy of the same project, so the two sessions don't overwrite each other. Their changes stay apart until they are combined.
Why use a Mac mini for an AI agent?
A Mac mini is small, quiet, cheap to run, and happy to stay on. Claude's scheduled jobs only run while the app is open and the computer is awake, which a laptop can't promise. It also takes long jobs off your laptop so you can close it.