Claude Code 2.1.233: Memory Caps for Runaway Builds
This episode breaks down Claude Code 2.1.233’s new opt-in Linux memory cgroup support for Bash tool commands, showing how it can stop runaway builds and leaking processes from taking down your whole dev machine. It also covers GitLab Merge Request worktree support, web cache tuning, and plugin validation improvements.
Show Notes
- claude-code/CHANGELOG.md at main: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
Chapter 1
Contain Runaway Builds with Linux Memory Cgroups in Claude Code 2.1.233
Lachlan Reed
You are, you are running Claude Code to execute a massive Webpack build or a heavy Rust compile, and suddenly, your entire dev box just freezes up. Fans spinning like a jet engine, cursor dead in the water because some rogue Node process gobbled up thirty two gigabytes of system memory. This episode is brought to you by Jellypod AI.
James Turner
Man, I, I, I have been there so many times. You sit there watching your machine die, and then the Linux kernel OOM killer comes in and nukes your actual terminal or the main Claude process instead of the child process that was, you know, going rogue.
Lachlan Reed
Right! It takes down the whole ship, mate. But, um, in Claude Code two point one point two thirty three, they added opt in memory cgroup support for Bash tool commands on Linux.
James Turner
Wait, cgroup support? So it, it actually caps the RAM at the kernel level before it can wreck your host system?
Lachlan Reed
Exactly. You just set an environment variable in your setup, CLAUDE_CODE_TOOL_MEMORY_LIMIT equals four G, or, or whatever ceiling you want, and boom. It leverages Linux cgroup version two memory controls to hold every Bash sub process in a strict box.
James Turner
So if a leaking test runner hits that four gigabyte limit, what, what actually happens? Does the whole AI session collapse?
Lachlan Reed
No! That is the best bit! The cgroup clamps down or terminates just that specific runaway tool process, while your main Claude process stays totally safe and sound. It can actually catch the failure and report the error back to you.
James Turner
That is huge for dev environments. But, wait, is there a catch with the OS support?
Lachlan Reed
Yeah, a bit of a caveat there. It requires Linux with cgroup version two mounted and systemd delegation enabled. So it won't operate natively on macOS or bare Windows, though it works fine inside WSL2 or Linux dev containers.
James Turner
Okay, so WSL2 and Linux containers get full protection. What else dropped in this patch?
Lachlan Reed
A few quick quality of life hits. If you use GitLab, the worktree flag now accepts GitLab Merge Request URLs directly, displaying as exclamation mark N inside claude agents.
James Turner
Oh nice, proper parity with GitHub Pull Requests. And didn't they add something for web sessions too?
Lachlan Reed
Yep, you can tune web caching using CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS, and run claude plugin validate to check your local skills frontmatter before deployment.
James Turner
Keeps your memory under control and your agent tools clean. Love it.
Lachlan Reed
Too right. Alright, good chatting, talk soon!