Per-class memory capping is wired to nearly every spawn site, but the exclusion list defaults to all new classes.
Claude Code can put the processes it spawns into a Linux cgroup with a memory limit, and this build makes that decision per class of process rather than all at once. The plumbing now reaches nearly every launch site: npm, git, tmux, systemctl, xdg-open, LSP, MCP, plugin installs and hooks. In practice nothing new is capped in this build, because the exclusion list falls back to the entire set of new classes, leaving only the pre-existing Bash shell path limited.
- The whole subsystem sits behind the server-side flag
tengu_tool_memory_cgroup, which falls back to off, unlessCLAUDE_CODE_TOOL_MEMORY_LIMITis set. - Which classes are exempt comes from
CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDEas a comma-separated list, else the server valuetengu_tool_cgroup_exclude_classes, whose fallback is empty and is treated as excluding all seven new classes:mcp,lsp,hooks,plugin,tmux,helperandagent, so onlyshellis capped. - The literal
all-newin the exclusion list expands to every non-shell class. - A spawn that does not name a class is treated as
helper, and capping is skipped whenever the class is in the exclusion set. - MCP is returned to the exclusion set even when otherwise enabled, unless
CLAUDE_CODE_MCP_MEMORY_CGROUPor the server valuetengu_mcp_memory_cgroupopts it back in. - The first time a given class is actually capped, the code reports
class_enabled. - Alongside it: out-of-memory kills are counted by parsing
oom_kill (\d+)from the cgroup, and a cgroup directory deleted underneath a running process is self-healed and reported as eitherrecreatedorvanished.
CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE, tengu_tool_cgroup_exclude_classes
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
tengu_tool_memory_cgroup Off in both readingsThe flag server returned off for the account this site reads and for the anonymous baseline. A reading of off cannot rule out a rollout these two readings sit outside of.
This account: off · anonymous baseline: off · compiled default in v2.1.246: not a boolean we can read
tengu_tool_cgroup_exclude_classes Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.246: not a boolean we can read
tengu_mcp_memory_cgroup Off in both readingsThe flag server returned off for the account this site reads and for the anonymous baseline. A reading of off cannot rule out a rollout these two readings sit outside of.
This account: off · anonymous baseline: off · compiled default in v2.1.246: not a boolean we can read
Read once, for one account on one subscription tier, against v2.1.246. It isn't a statement about your account. What a flag value here can and cannot tell you
A reading is one sample. Claude Code evaluates its flags remotely, so no client sees the targeting rule behind a value and this says nothing about your account.
A reading is one sample. Claude Code evaluates its flags remotely, so no client sees the targeting rule behind a value and this says nothing about your account.
New in this build: CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE