Live data from Hacker News

Accidentally created my first fork bomb with Claude Code

droppedasbaby.com

21–28 of 28 posts

Re: Accidentally created my first fork bomb with Claude Code

#22
My first was when I was arguing with the IT guy about local shells on their big iron at Uni.

I told him it was a risk to let dumbasses like us have a shell on his server. He said we couldn't do anything, that they were unprivileged accounts.

"Watch this", says I, as his machine froze.

I got in so much trouble for that. I hope you can't do that kind of thing any more.

Re: Accidentally created my first fork bomb with Claude Code

#23
Wasn't my first, but my first unintentional one was writing multiprocessing code with Python on Windows many years ago. Not sure if this is still true now, but if you didn't wrap your main entrypoint in a if __name__ == "__main__" block, and your code spun up a worker pool, Python would reload your module for every child since Windows doesn't have a fork() for it to use, and they'd all happily rerun the code to create children, and so on.

Re: Accidentally created my first fork bomb with Claude Code

#24
And they say you can't learn anything about computers from these bots... I had to learn this lesson from giving a shell account to one of my compatriots. I worked with him on group projects so I trusted him. He installed a fork bomb in his user's cron tab that went off at 3:00 a.m. everyday and I had to wonder why my hand compiled DRI driven screensaver went to a crawl. I did learn the lesson and I did forgive him. But it didn't cost me a couple Grand in API fees.

Re: Accidentally created my first fork bomb with Claude Code

#25

Earlier quoted context omitted.

I don't know about the author, but I recently saw an article where the author of Claude code apparently spins up multiple instances at once (note that it could have just been a marketing ploy to get people to use more tokens) https://www.xda-developers.com/set-up-claude-code-like-boris...

Just use Git worktrees and a lightweight VM environment (I like macOS native sandbox-exec) and you can spawn as many sessions as you want. I've run upwards of 30 at once on my M2 Pro with no noticeable resource impact.

I would love to know more, but am so ignorant about working with multiple sessions running in parallel that I don't know where to start - do you have a blog or published article to share that might get people like me into a more educated space

Re: Accidentally created my first fork bomb with Claude Code

#26

Earlier quoted context omitted.

Just use Git worktrees and a lightweight VM environment (I like macOS native sandbox-exec) and you can spawn as many sessions as you want. I've run upwards of 30 at once on my M2 Pro with no noticeable resource impact.

I would love to know more, but am so ignorant about working with multiple sessions running in parallel that I don't know where to start - do you have a blog or published article to share that might get people like me into a more educated space

Emails on my profile, I'll run you through it all on a call. No I don't but I really should actually.

Re: Accidentally created my first fork bomb with Claude Code

#27

What was the purpose of having Claude Code spin up two more instances of Claude Code though? What was the intended outcome there?

I don't know about the author, but I recently saw an article where the author of Claude code apparently spins up multiple instances at once (note that it could have just been a marketing ploy to get people to use more tokens) https://www.xda-developers.com/set-up-claude-code-like-boris...

I tend to have multiple sessions running when doing stuff with CC. But rarely in the same space / domain. I'll have one working on some programming task, another making changes to my NAS and another doing research for some other topic (most recently networking gear upgrade paths).

Re: Accidentally created my first fork bomb with Claude Code

#28

Earlier quoted context omitted.

Just use Git worktrees and a lightweight VM environment (I like macOS native sandbox-exec) and you can spawn as many sessions as you want. I've run upwards of 30 at once on my M2 Pro with no noticeable resource impact.

I would love to know more, but am so ignorant about working with multiple sessions running in parallel that I don't know where to start - do you have a blog or published article to share that might get people like me into a more educated space

Hey! No email yet. I'm not going to sell you anything btw so reach out!
Post reply on HN