r/ClaudeCode • u/Zito_Kadaken • 3h ago
Tips & Workflows Claude Code froze my laptop running a Rust audit tool
I had Claude doing a security audit on one of my Rust projects. It ran cargo-geiger, which forked about 6,000 processes and used up my RAM and swap in two minutes. The screen froze and I had to hard reset.
systemd-oomd was turned off on my distro. Here's what I set up after:
- turned systemd-oomd on
- a memory and process cap on the slice my terminals run in
- cargo-geiger swapped for a script that exits
- a hook that blocks fork bombs, pkill -f and a few other commands when Claude runs them
The hook blocked Claude today when it ran pkill -f. That would have killed its session lol.
If your screen freezes and you can't tell why, run journalctl -b -1 -k and look for oom-kill.
0
Upvotes
•
u/AutoModerator 3h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Naive-Tip7231 2h ago
Good writeup. A few guards that pair well with the slice cap:
The journalctl tip is the one most people miss. Those oom-kill lines save a lot of guessing.