{"version":"2.1.233","anchor":"bash-and-powershell-tools-can-run-under-a-memory-limit-on-li","canonical_anchor":"bash-and-powershell-tools-can-run-under-a-memory-limit-on-li","heading":"Bash and PowerShell tools can run under a memory limit on Linux","tier":"use","area":"Bash Tool","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.233\/e\/bash-and-powershell-tools-can-run-under-a-memory-limit-on-li","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.233","markdown":"### Bash and PowerShell tools can run under a memory limit on Linux\n\nOn Linux you can cap memory for shell commands so a runaway process cannot eat your machine.\n\n**What**\n\nOn Linux and WSL, shells spawned by the Bash and PowerShell tools can now be placed in a `claude-code-bash` memory cgroup so a runaway command hits a cap instead of your machine. Set `CLAUDE_CODE_TOOL_MEMORY_LIMIT` to a size such as `2g` to pick the cap, or to `none` to switch it off. With no explicit size it only engages when the remote flag `tengu_tool_memory_cgroup` is on, which is off by default in this build.\n\n**Details**\n\n- Writes `memory.max` on cgroup v2 and `memory.limit_in_bytes` on v1.\n- With no override the limit is derived from total system RAM.\n- Other platforms return early and spawn normally.\n- Reports the outcome as `tengu_tool_cgroup` with status enabled or disabled, and logs a `tool cgroup: disabled (` line with the reason.\n\n**Usage**\n\n`CLAUDE_CODE_TOOL_MEMORY_LIMIT=2g claude` **Evidence** `tengu_tool_cgroup`, `tool cgroup: disabled (`\n\n- Flag `tengu_tool_memory_cgroup`: Off in both readings (read for one account on one subscription tier against v2.1.233; this account: off, anonymous baseline: off, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Bash Tool\n- Names: `CLAUDE_CODE_TOOL_MEMORY_LIMIT`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5"}