{"name":"CLAUDE_CODE_EXIT_AFTER_STOP_DELAY","slug":"claude-code-exit-after-stop-delay","family":"env","title":"Environment variables","noun":"environment variable","description":"Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode","description_source":"docs","described_by":{"doc":"claude-code\/env-vars","title":"Environment variables"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":149,"mined_builds":149,"first_cited":{"version":"2.1.269","released_at":"2026-09-11 18:12:49","spans":1}},"aliases":[],"entries":[{"version":"2.1.269","anchor":"idle-exit-timer-now-runs-a-caller-callback-right-before-exit","heading":"Idle-exit timer now runs a caller callback right before exiting","line":"The idle-exit timer can now run a callback right before Claude Code exits","released_at":"2026-09-11 18:12:49","reason":"found in this entry's text, named in this entry"},{"version":"2.1.269","anchor":"bridge-sessions-can-now-idle-exit-instead-of-just-completing","heading":"Bridge sessions can now idle-exit instead of just completing","line":"Bridge-spawned sessions can now be set to exit after sitting idle, reporting status as \"idle\" instead of \"completed\"","released_at":"2026-09-11 18:12:49","reason":"found in this entry's text"},{"version":"2.1.246","anchor":"idle-exit-after-a-configurable-delay","heading":"Idle exit after a configurable delay","line":"Set a delay and Claude Code will shut itself down after sitting idle that long.","released_at":"2026-08-25 19:17:34","reason":"named in this entry, found in this entry's text"},{"version":"2.0.35","anchor":"optional-auto-exit-on-idle","heading":"Optional Auto-Exit on Idle","line":null,"released_at":"2025-11-06 20:25:20","reason":"found in this entry's text"}],"entries_total":4,"docs":[{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":true}],"docs_total":1,"gates":[],"related":[{"name":"CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER","slug":"claude-code-exit-after-first-render","description":"Accepting fullscreen now runs as a trial, and two crashed launches disable it on that machine."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-exit-after-stop-delay","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}