{"version":"2.1.305","anchor":"background-wait-loop-in-the-drain-logic-reworked","canonical_anchor":"background-wait-loop-in-the-drain-logic-reworked","heading":"Background sessions decide when to keep waiting in a new way","tier":"internal","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305\/e\/background-wait-loop-in-the-drain-logic-reworked","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305","markdown":"### Background sessions decide when to keep waiting in a new way\n\nThe check that keeps a background session waiting now looks at swept sessions, unswept sessions and pending wakeups separately\n\n**Unclear.** It is not clear whether background or headless sessions now stay running longer or stop sooner.\n\n**What**\n\nWhen Claude Code runs without a screen, or in the background, it waits for remaining work to finish before it stops. The check that decides whether to keep waiting was rewritten. It now combines separate checks for sessions that have been swept, sessions that have not, and any session waiting to be woken up.\n\n**Why**\n\nThis can change how long headless or background sessions stay running before they exit.\n\n- Area: Sessions\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}