Setting up your spare Mac for Claude Code to control, a step-by-step guide
TL;DR Highlight
Setting up a spare Mac with SSH and tmux gives Claude Code an isolated machine you can drive from your phone.
Who Should Read
A Mac-using developer who wants to run agents with --dangerously-skip-permissions but doesn't trust their main machine.
Core Mechanics
- Isolate the agent on a spare Mac
- Create a fresh local account with no Apple ID and no personal data.
- With nothing sensitive to reach, giving broad permissions is less risky.
- Containers weren't enough
- A container still runs on your main machine, and its network requests go through it.
- Mac-only apps like Unity can't run in one, so computer use can't control them either.
- SSH and sleep prevention are the backbone
- Enable Remote Login and connect with an ed25519 key. The guide recommends a .local hostname over an IP.
- Use pmset to disable sleep and stop the screen saver from locking.
- Computer use doesn't work over plain SSH
- macOS ties Screen Recording and Accessibility permissions to the GUI login session, so SSH processes can't reach the display.
- A LaunchAgent keeps a tmux server alive inside the GUI session, and claude sessions started there inherit access.
- Grant permissions to tmux, not claude
- macOS attributes capture and control to the responsible process, which is the tmux server.
- Restart the tmux server after granting so new sessions pick it up. The grants can't be scripted and must be done at the machine.
- Control it from your phone or main Mac
- /remote-control or claude remote-control lets you drive sessions from the Claude app.
- ic.sh spawns multiple sessions on the box, and your main Mac's Claude can prompt the box's Claude via tmux send-keys.
Community Reactions
- A VM with libvirt is enough, one commenter argued
- They see no reason for real hardware isolation outside graphics development.
- They give Claude root and a desktop for Chrome UAT, and reinstall in seconds if it breaks things.
- Connection drops reported by someone running the same setup
- They used it as a free replacement for an OpenClaw bot.
- It sometimes loses its connection and the phone handoff must be redone.
- The isolated box still has network access, commenters warned
- It's cut off from your files but can still reach other devices on the network.
- Several suggest a separate VLAN or deny-all firewall rules.
- Giving sudo to an agent is reckless, one commenter said
- They give Claude an unprivileged UNIX account only.
- They don't bother with containers or VMs.
- Alternative setups shared by commenters
- One controls Claude Desktop on a Mac mini M4 with Dispatch.
- Another uses terminus + wireguard + tmux from their phone.
- Another runs macOS in a UTM VM, but UI performance was poor.
How to Apply
- Audit your agent machine's isolation
- Within 30 minutes, list the personal data, Apple ID and logged-in accounts on the machine your agent runs on.
- If you have a spare Mac, create a fresh local account without an Apple ID.
- Set up SSH keys and sleep prevention first
- On the target, run sudo systemsetup -setremotelogin on, then ssh-keygen and ssh-copy-id as in the guide.
- Run sudo pmset -c sleep 0 and verify you can ssh in.
- Put the box on a separate VLAN or behind a firewall
- Move it to a guest network or VLAN on your router.
- Block access to internal devices and allow only internet.
- Grant tmux permissions and restart the server for computer use
- Run setup-computer-use.sh, then enable Screen Recording and Accessibility for tmux at the machine.
- Run tmux -S /tmp/cc-tmux.sock kill-server and confirm it works in a new session.
Try It
# Run in the target Mac's terminal (or over SSH). Summary of steps 3 and 6. {{user}} is the target account name
echo "{{user}} ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/{{user}}-nopasswd >/dev/null
sudo chmod 440 /etc/sudoers.d/{{user}}-nopasswd
sudo visudo -cf /etc/sudoers.d/{{user}}-nopasswd # must print 'parsed OK'
sudo -n true && echo ok
sudo pmset -c sleep 0
sudo pmset -c disablesleep 1
sudo pmset -c displaysleep 0
pmset -g | grep -iE 'sleep'
# Next: on your main Mac run ssh-keygen -t ed25519, then ssh-copy-id {{user}}@{{hostname}}.local, then ssh {{user}}@{{hostname}}.local whoamiTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques
Related Resources
- https://ykdojo.github.io/claude-controls-mac/
- https://raw.githubusercontent.com/ykdojo/claude-controls-mac/main/clip.sh
- https://raw.githubusercontent.com/ykdojo/claude-controls-mac/main/setup-claude-env.sh
- https://raw.githubusercontent.com/ykdojo/claude-controls-mac/main/setup-computer-use.sh
- https://raw.githubusercontent.com/ykdojo/claude-controls-mac/main/ic.sh