Tools reference changedtools-reference
Nearest release: v2.1.250, published 3 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+19added
Lines−3removed
From line
185
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits74to this page, all time
The whole hunk
from line 185, old and new numbered
/
from line 185
185185
186186### Memory limit on Linux and WSL
187187
188On Linux and WSL, set [`CLAUDE_CODE_TOOL_MEMORY_LIMIT`](/docs/en/env-vars#variables) to a size such as `4G` to cap the memory that Bash and PowerShell tool commands can use, so one runaway build can't take the memory the rest of the session needs. Requires Claude Code v2.1.233 or later.
188On Linux and WSL, set [`CLAUDE_CODE_TOOL_MEMORY_LIMIT`](/docs/en/env-vars#variables) to a size such as `4G` to cap the memory that Bash, PowerShell, and [Monitor](#monitor-tool) tool commands can use, so one runaway build can't take the memory the rest of the session needs. Requires Claude Code v2.1.233 or later. Before v2.1.246, Monitor tool commands ran outside the cap.
189189
190190* Write the size as a number of bytes or with a `K`, `M`, `G`, or `T` suffix. Set `0`, `off`, `false`, `no`, or `none` to turn the cap off. Claude Code ignores any other value it can't read as a size, such as `4e9`.
191* Claude Code counts all of a session's Bash and PowerShell commands against the one cap, not each command on its own.
191* Claude Code counts all of a session's Bash, PowerShell, and Monitor commands against the one cap, not each command on its own.
192192* Claude Code applies the cap with a memory cgroup. When it can't set the cgroup up, commands run without a cap, and the debug log from `claude --debug` says why.
193* After a Bash or PowerShell tool command has turned the cap on, or has turned it off because of an off value or a failed cgroup setup, Claude Code holds that result until you relaunch. To apply a changed or removed value, or a fixed setup, launch `claude` again.
193* After the first process Claude Code starts has turned the cap on, or has turned it off because of an off value or a failed cgroup setup, Claude Code holds that result until you relaunch. To apply a changed or removed value, or a fixed setup, launch `claude` again.
194194* When commands can't stay under the cap, the kernel kills a command, and nothing in its result names the cap.
195
196Claude Code can also count other kinds of processes it starts against the same limit. Set [`CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE`](/docs/en/env-vars#variables) to a comma-separated list of the kinds to exempt from the cap; Claude Code applies the cap to every kind not on your list. Set it to `none` to cap every kind, or to `all-new` to cap only Bash, PowerShell, and Monitor tool commands. Requires Claude Code v2.1.246 or later. The kinds you can name:
197
198* `mcp`: local [MCP servers](/docs/en/mcp)
199* `lsp`: [language servers](#lsp-tool-behavior)
200* `hooks`: [hook](/docs/en/hooks) commands
201* `plugin`: commands that [plugins](/docs/en/plugins) run
202* `helper`: Claude Code's own helper commands, such as `git`
203* `agent`: child Claude Code processes, such as [agent teammates](/docs/en/agent-teams)
204
205Whatever you list, these rules apply:
206
207* **Unknown names**: Claude Code ignores names it doesn't recognize
208* **Bash, PowerShell, and Monitor**: Claude Code keeps Bash, PowerShell, and Monitor tool commands under the cap whatever you list
209* **Variable unset**: Claude Code takes the set of other capped kinds from configuration Anthropic delivers from the server, and that set can change over time, so set the variable when you need a set that doesn't change
210* **Permission-gating hooks**: even with every kind capped, Claude Code excludes from the cap a hook that can block or change the outcome of an action, and any MCP server that such a hook calls, so the kernel killing a permission-gating hook can't allow the action it was blocking
195211
196212## Edit tool behavior
197213
No line in this hunk matches that.