diff --git a/modules/home/claude/default.nix b/modules/home/claude/default.nix index edc56d27..b0ebf5e2 100644 --- a/modules/home/claude/default.nix +++ b/modules/home/claude/default.nix @@ -19,6 +19,9 @@ let env = { CLAUDE_CODE_RETRY_WATCHDOG = "1"; CLAUDE_CODE_MAX_RETRIES = "1000"; + # Under memory pressure Claude Code kills idle background shells, which + # frees almost nothing. Reclaiming memory is the OOM killer's job. + CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP = "1"; }; enabledPlugins = { "rust-analyzer-lsp@claude-plugins-official" = true;