{"name":"CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP","slug":"claude-code-disable-bg-shell-pressure-reap","family":"env","title":"Environment variables","noun":"environment variable","description":"Set to `1` to stop Claude Code from terminating [background shell commands](\/docs\/en\/interactive-mode#background-bash-commands) under memory pressure. By default, on macOS and Linux, Claude Code terminates background shells when the operating system reports critical memory pressure and the session has been idle for 30 minutes with no turn or subagent running. Windows has no memory-pressure signal, so this variable has no effect there. Requires Claude Code v2.1.193 or later","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.193","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":104,"mined_builds":150,"first_cited":{"version":"2.1.274","released_at":"2026-09-16 22:36:09","spans":1}},"aliases":[],"entries":[{"version":"2.1.274","anchor":"memory-pressure-background-shell-reaper-gets-an-explanatory","heading":"Memory-pressure background-shell reaper gets an explanatory user message; feature itself already live","line":"Claude now explains to itself why a background shell was stopped for memory pressure and how to disable it","released_at":"2026-09-16 22:36:09","reason":"named in this entry, found in this entry's text"}],"entries_total":1,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true},{"source":"claude-code","path":"interactive-mode","title":"Interactive mode","documented":false}],"docs_total":2,"gates":[],"related":[{"name":"CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF","slug":"claude-code-disable-bg-exit-handoff","description":"Set to `1` to stop a [background session's](\/docs\/en\/agent-view) running background shell commands, dynamic workflows, and, as of v2.1.198, background subagents when the [supervisor](\/docs\/en\/agent-view#the-supervisor-process) stops, restarts, or updates that session's process, instead of handing them to the session's next process. Affects only that handoff: backgrounding a session with `\u2190` or [`\/background`](\/docs\/en\/agent-view#from-inside-a-session) still carries in-flight work over, and `CLAUDE_DISABLE_ADOPT` turns off both. Requires Claude Code v2.1.196 or later"},{"name":"CLAUDE_CODE_DISABLE_BG_STABLE_PATH","slug":"claude-code-disable-bg-stable-path","description":"On macOS, setting CLAUDE_CODE_DISABLE_BG_STABLE_PATH makes background sessions relaunch from the running program instead of the stable path"}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-disable-bg-shell-pressure-reap","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}