The laptop is just a remote. The work and the files stay on the mini.
Why the laptop trick is a hack
When Claude Code runs in a terminal on your laptop, the laptop is the computer doing the work. Close the lid and macOS sleeps, the process freezes, and the job stops halfway. Hence the open-lid shuffle.
The fix is to move the work somewhere that never sleeps and keep only the conversation on the laptop.
The setup
The Mac mini sits on my desk with no monitor. It runs one long-lived program, claude remote-control, which signs in to my Claude account and registers the machine as an environment called Mac mini. When I start a session in the Claude app or at claude.ai/code and pick that environment, the mini spins up a Claude Code worker for it, in my ~/projects folder, with my tools.
A LaunchAgent starts the bridge inside a detached tmux session as soon as I'm logged in:
<!-- ~/Library/LaunchAgents/com.william.claude-rc.plist -->
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/tmux</string>
<string>new-session</string><string>-d</string>
<string>-s</string><string>rc</string>
<string>claude remote-control --name "Mac mini"</string>
</array>
<key>RunAtLoad</key><true/>
<key>WorkingDirectory</key><string>~/projects</string>
tmux means I can SSH in and run tmux attach -t rc to see the bridge if something looks off.
Keeping it awake
None of this works if the mini sleeps, so its power settings are set to never sleep and to come back on their own:
- sleep 0
- Never sleep on AC power
- disksleep 0
- Never spin down the disk
- autorestart 1
- Boot back up after a power cut
- womp 1
- Wake for network access
- auto-login
- On, so the LaunchAgent starts after a reboot with no one at the keyboard
- displaysleep 10
- The (absent) display can sleep; that's fine
Auto-login only works with FileVault off, which is the trade I made for a machine that lives at home. If yours carries anything sensitive, keep FileVault on and accept that after a power cut you'll have to log in once with Screen Sharing.
Claude Code also holds its own caffeinate lock while it's working, so even a mini with default settings stays awake mid-task.
What a session looks like
- Open the Claude app on the MacBook or phone, start a new Code session and pick Mac mini.
- Say the job in plain words: "run the tests in wow-creator-suite and fix whatever fails".
- Close the lid. Go outside.
- Check in from the phone whenever. The conversation is the same on every device.
- When it's done, the work is committed in the repo on the mini. Pull it onto the laptop if I want it there.
What's on the mini
Homebrew, git, Node 26 with npm and pnpm, Python 3.14, the GitHub CLI and tmux, plus every project I'm working on cloned into ~/projects. Claude uses whatever is installed there, so if a job needs a tool, it goes on the mini, not the laptop.
Rough edges
- Nothing restarts a crashed bridge. The LaunchAgent runs once at login. Adding
KeepAlivewould bring it back, though tmux makes that awkward, since tmux exits as soon as it starts the session. - The mini needs its own credentials. Pushing to GitHub, signing in to services: all of that has to be set up on the mini, because that's where the commands run.
- Apps that need a screen, like an Xcode simulator or OBS, run fine but you can't see them without Screen Sharing.