March 31, 2026
Automation meets auto-chaos
Accidentally created my first fork bomb with Claude Code
From “oops” to “RAM-ageddon” — commenters roast, reminisce, and ask WHY
TLDR: A developer’s “self-spawning” setup triggered a chain reaction of apps that froze their Mac overnight, but memory bloat kept the bill to about $600. Commenters split between prankster nostalgia, warnings about runaway tools, and blunt skepticism over why anyone would design it to spawn two more copies in the first place.
A late-night automation gone wild turned one developer’s Mac into a space heater after they unknowingly created a “fork bomb” — basically a chain reaction where one app keeps opening more copies of itself until the computer chokes. The twist? It was built with an AI coding tool and a startup script that spawned two more copies every time it launched. By morning, the machine was locked up and the bill was the next panic… until they saw it “only” hit $600 because the bloated apps ate all the memory and crashed before the charges could snowball.
That’s the story, but the comments? Pure chaos. Old-school pranksters showed up to flex, with one bragging that theirs was intentional back in college when “open telnet” meant you could hijack a friend’s PC for laughs. A chill ran through the thread when another user mused that even badly running code is still faster than people, so these mistakes scale fast — and expensively. Some veterans dropped cautionary wisdom (“never trust example code, even from the big guys”), while the straight-shooters demanded answers: Why on earth would anyone set it to launch two more copies of itself? Meanwhile, the peanut gallery cackled at the phrasing “my first,” implying there will be a sequel.
Between nostalgia, fear of runaway “agent” tools, and sheer schadenfreude, the crowd crowned the real MVP: terrible, memory-hogging software that ironically saved the day — and the expense report.
Key Points
- •A custom SessionStart hook spawned two Claude Code instances per start, causing exponential process growth overnight.
- •The resulting fork bomb led to a macOS system lockup with high memory pressure and an unresponsive machine.
- •Attempts to terminate processes via Activity Monitor and pkill were outpaced by rapid respawns, requiring a force restart.
- •The author removed the hook from ~/.claude/settings.json and verified a single safe instance on restart.
- •API usage increased by about $600, but high per-instance memory use and Claude caching limited the potential costs.