Top
Best
New

Posted by ykev 6 hours ago

Setting up your spare Mac for Claude Code to control, a step-by-step guide(ykdojo.github.io)
156 points | 118 comments
esaym 4 hours ago|
Outside of the article's mentioned graphics development, there is no reason to isolate an agent using actual hardware. I threw together this script[0] using libvirt to give claude its own graphical desktop env to be able to do user acceptance testing with Chrome. It has full root and can do what ever. If it makes a mess, I can dump and reinstall in seconds.

0: https://gist.github.com/smith153/04b4068b5a2d7b234f1c3d5992d...

andai 3 hours ago||
Nice. I just have

  sudo useradd agent

  sudo su agent
So it can blow up its own files, but not mine.

It was also doing some kind of headless Chrome stuff in there. I don't know how that works, but it was taking screenshots iirc.

I did also set up VNC at some point but didn't find it worth using.

>If it makes a mess, I can dump and reinstall in seconds.

This is also true of a $3 VPS, where I found it very amusing to give my agent root. What's the worst that could happen ;)

jfb 4 hours ago|||
You can run macOS in a VM guest on a Mac host; Apple explicitly allows this.
gitowiec 1 hour ago||
Lol :D
hangrybear666 1 hour ago|||
You mean you had claude throw together a script because this is heavily generated. Lost interest after about 250 lines, it's just tiresome reading through this incoherent amalgamation
esaym 58 minutes ago||
Yeah bro, you can just use AI!
mmh0000 4 hours ago||
This is neat, and thank you for sharing!

I've been wanting to set up something exactly like this for my own use, but... You know, time is limited.

This is just enough scaffolding to have a little project for Monday morning!

esaym 3 hours ago||
There are many ways and tools on linux to get a "VM" up and running. But with libvirt you can easy script out what the initial environment and network stack is. The heart of it is just running the 'virt-install' command, but as you can see I've got a bunch of other opinionated stuff going on before that.
nunez 3 minutes ago||
This is the paranoia talking, but given that Claude is going to be doing its own thing, I would put this box in its own VLAN or behind deny-all firewall rules to protect against network escapes.
catoc 5 hours ago||
I just cannot come up with a good AI-is-actually-24/7-helping-me-out use case.

Please help: I wánt to need this!

ianm218 4 hours ago||
Many Claude Code power users don’t really use IDEs anymore, so the only purpose of them working from their laptop instead of a phone is because that is the normal way to do it.

Here is a real use case: you are are responsible for some alerting channel. You have datadog/ cloud logging/ github all connected. You see a bunch of alerts come through while you are out and about and you prompt CC to investigate - Claude triages and says “all of the sudden you are getting time outs from this bank API your company partners with, this started an hour ago. It’s happening on ~15% of requests”. So you ping the guy at your company who does vendor relationships and go back to your weekend.

This is a non hypothetical example. Obviously it would be better if your job had a real on call rotation and more robust alerting and you wouldn’t be getting slack alerts on the weekend… but I take the approach this job affords me a lot of nice flexibility so it’s ok

thwarted 4 hours ago|||
You don't have an on-call rotation but do have people dedicated to vendor relationships, and that guy works on the weekend? I'm not sure how you completely avoid getting alerts on the weekend for third-party payment processor issues, which can happen anytime, if you actually want to transact business on the weekend.
ianm218 5 minutes ago||
I said vendor here but it’s more like banks we work with. So there’s someone responsible for the technical side of banking relationships.

But yeah it’s kinda a zone where most weekends there’s no problems so it’s not a huge priority… until it is

hangrybear666 1 hour ago|||
Yeah good luck being employed in 3 years once this bubble popped when all you do is type some natural language into a phone screen. People being proud of not using an IDE anymore is such a foreign concept to me, who enjoys coding and got into the profession because of the love of that.
ianm218 9 minutes ago|||
The “debugging” for these type of issues is looking at some logs and http responses and being like “ah if we get this error it means they restarted their firewall again and took us off the whitelist. Email that guy Joe at the bank and hope he responds”. It’s not rocket science or the majority of my job… but someone’s needs to do it. We automate all the stuff we can.
ChrisGreenHeur 21 minutes ago|||
If you got into the industry due to enjoying the typing of code the future is looking pretty bleak.
cj 9 minutes ago||
I dunno.

I've been watching "How it's made" on Hulu to fall asleep at night.

My sleepy mind is constantly blown away by how many things are made with human hands, despite the ability to automate.

voidingw 4 hours ago|||
I've used it for the following when I've had tokens to burn:

  - Fuzzing with the goal for it to apply domain-specific and source-informed knowledge to choose specific fuzzing approaches.
  - More generally, any optimization problem that benefits from domain-specific or source informed knowledge.
  - Running Microsoft's SkillOpt [0].
[0]: https://github.com/microsoft/SkillOpt
vcf 4 hours ago|||
I run a lot of data science-type analyses that can take up to hours at a time to run, so Claude is « monitoring » tasks most of the time. I have it on remote-control so I get notified when a task is done or need clarification, but most importantly whenever I have a new idea, I can just ask Claude to queue it up. Most of the time my hardware is the bottleneck, not the subscription quotas.
catoc 4 hours ago|||
That makes sense - thanks. Do you use hooks for this?
vcf 1 hour ago||
I used to have some hooks for local notification, but lately I find that claude is pretty good at notifying through the app with remote control (but definitely not perfect)
troupo 1 hour ago|||
> take up to hours at a time to run, so Claude is « monitoring » tasks most of the tim

How is Claude monitoring them for hours? Claude runs out of context and extremely long sessions are prohibitively expensive even according to Anthropic (after they dispense with the marketing bullshit of long running tasks)?

dandaka 1 hour ago|||
Few cases I have found very useful myself

1/ Using GUI software. My agents are using headful Google Chrome and Figma. It helps a lot to have separate environment, which is not interfering my main machine.

2/ Running long processes (1h+), so I can leave main machine closed.

3/ Running intensive processes. I use Gemma, Whisper and Qwen, which could burn main machine CPU and resources.

amelius 1 hour ago|||
Letting it control a browser and searching for a pair of pants of a given size and length and color and style.

Yes, surprisingly, this is something Google cannot do yet.

trentor 1 hour ago|||
I changed all smart speakers to retrofitted old radios with an amp and a pi. The hot word detection runs on the pi itself but whisper and LLM/task orchestrations goes over my local server with a 4080.
hamdingers 4 hours ago|||
They help folks on fixed rate plans consistently hit their usage limits which provides them the feeling of getting their money's worth.
kushie 5 hours ago|||
i like using /remote-control to keep vibe dev running smoothly against my usage limits and deadlines
catoc 4 hours ago||
Running Claude code 24/7 on a code base on that “second Mac” so you can always continue after a usage limit reset, from your main device or from your phone?
j45 3 hours ago|||
It's less about 24/7. It's more about it can't work when your laptop is in your bag and in transit and there is something that you have set up and want to run.
hangrybear666 1 hour ago||
Oh yeah sounds great working in your free time and while traveling to buy groceries to feed yourself so you can continue working.
MattGaiser 1 minute ago||
That time is otherwise worthless, so yes?

I don't value my travel time at all, but it used to be wasted on travelling.

bagels 2 hours ago|||
Do you do software development? Is there any work left at the end of the day? Have it do that stuff.
troupo 1 hour ago||
I always have to correct its hallucinations during the day. Why would I ever let it run unsupervised overnight?
amelius 46 minutes ago||
Running tests and optimize?
troupo 13 minutes ago||
Running tests that the agent created for its own hallucinations? Optimize using another hallucinating agent?

Which tests and optimizations do you propose to run after a night of supervised work when one of main things that all agents keep doing is "load all records from db , and filter them in memory"? It's now become so bad, I had to literally vibecode a separate linter for this. And that's just one of the problems.

overgard 2 hours ago|||
I think the main use case for AI bros is to setup a goofy looking dashboard, name it Jarvis to cosplay being Tony stark, and display stats for all the generated videos they're posting to social media.

(I wish I was joking)

popalchemist 2 hours ago|||
Generating leads for new work, if you are a freelance. Automatically answering customer support emails, if you own a SaaS. Monitoring competitors' socials, websites, etc for new features you have to compete with. Monitoring updates on software you depend on for breaking change / deprecation announcements.
ProofHouse 4 hours ago|||
ask AI to help
msh 5 hours ago||
Same here
smetannik 31 minutes ago||
Why a spare machine has to be exactly a mac ? For iMessage?
kiddico 42 seconds ago|
New macs share memory between the cpu and the GPU so the GPU gets a lot of ram for a low cost (relative to everything else available right now.)
arxari 5 hours ago||
> setting up your spare Mac

as one has

ProofHouse 4 hours ago|
i once thought the same
j45 3 hours ago||
They seem to hang around.
somewhatrandom9 4 hours ago||
Though it doesn't get by all the hurdles mentioned, it is alternatively possible to run Mac OS in a VM on your Mac using UTM and install Claude Code within the UTM VM. UTM can be run under a non-admin Mac account. This can allow you to use most Mac-native tooling, at least. The interactive performance of using the Claude Code ui on the VM isn't great, however. I'm not sure if you can log into the VM via terminal on the host from the non-root admin account to avoid the ui performance issues.
booi 4 hours ago|
An argument against this method is UTM doesn't support graphics acceleration so browser support will be hobbled. Even if you don't need the acceleration, I've found browsers in UTM virtualized OS's can't get past some modern captchas and other browser fingerprinting checkpoints :\. It's terrible but that's the way it is.
fsflover 4 hours ago||
> browsers in UTM virtualized OS's can't get past some modern captchas and other browser fingerprinting checkpoints :\

I'm using Qubes OS, where everything runs in VMs without GPU acceleration, and never experienced this.

addajones 6 hours ago||
I currently have Claude Desktop installed on a separate Mac mini M4 and control it with Dispatch. Is there a reason to do this method, it still seems the way I have it setup it has full control over the local account I gave it on the Mac mini.
tyre 5 hours ago||
Why would you need an M4 for this? If most of the "thinking" is happening on Anthropic's side, are you running particularly resource-intensive apps?
theptip 5 hours ago|||
I found Dispatch to be less capable than RC. The latter is more like the direct Code experience (though there are some gaps in RC mode vs in a Claude-owned sandbox).

I’d love to just have Claude use my machine as a sandbox host instead of having to run RC on each host session. (In case you are listening Boris ;) ).

In the meantime I have a janky master RC session that creates new tmux windows and Claude RC sessions for each new code trajectory that I want to run.

The other benefit here is you can drop down and use termux to use Code directly if you hit a RC bug, I found permissions UX to be a bit flaky in the iOS UI.

hahajk 6 hours ago|||
Dispatch/Cowork is basically claude code in a container. The section "Why not run it in a container?" would address your question in the post. One example I run into is that Cowork won't download and fill out or read pdfs or other files due to container permissions. Vanilla claude code has no problem using curl and wget.
_puk 4 hours ago||
Cowork gets tangled with git as well. Fails, and then can't delete lock files.

Running a helper from the terminal, making Claude work in a working directory, and then create a .commit file has been my workaround for this for a while now.

Imagine there's a better solution nowadays, but this allows me to use dispatch building on Vercel, so I can check it out from wherever, without too much pain.

j45 3 hours ago||
Claude dispatch does things differently than this. Dispatch is very convenient for somethings (including connectors).

But increasingly it seems like dispatch was slapped on top of cowork incrementally, when there was not an integrated and cohesive strategy across cowork between mobile/desktop/laptop. This is kind of what many of us get/got to learn in our 20's.

dchuk 5 hours ago||
I just redid my homelab/media server (switched from an old NUC I couldn’t figure out how to stop overheating even with some decent modification work, now using an hp elitedesk with an i5 processor that is handling my stack nicely). Thinking about setting up a vm on the base ubuntu install for isolation to run Claude in. May play with dispatch, may just put raw Claude code then use Moshi app on my iPhone and iPad.
mead5432 2 hours ago|
I have a similar setup with Claude on an Ubuntu VM. It handles scheduled things that might otherwise be in a routine.

I haven’t set up dispatch yet. I wonder what a Mac gets me over this set up if I don’t need iMessage

brandnewideas 5 hours ago|
You people are too far gone
hangrybear666 1 hour ago||
Yeah these guys will set up claude on their third pc after they realize their second pc keeps hallucinating out code nobody cares about or needs in hopes of staying relevant. I'll just keep coding by hand because I ACTUALLY ENJOY it. What a novel concept these days.
bagels 2 hours ago||
You're being left behind.
LetsGetTechnicl 8 minutes ago|||
How am I being left behind by not using AI? I have a fully functional brain that I can use to do anything AI can and better.
vor_ 27 minutes ago|||
For what it's worth, which may be nothing, I remember being told that by NFT people.
More comments...