{"version":"2.1.299","anchor":"session-end-latch-and-mid-turn-tracking-in-the-stream-runner","canonical_anchor":"session-end-latch-and-mid-turn-tracking-in-the-stream-runner","heading":"Ending a headless or remote session can now be waited on","tier":"internal","area":"Headless Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/session-end-latch-and-mid-turn-tracking-in-the-stream-runner","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Ending a headless or remote session can now be waited on\n\nHeadless and remote sessions now signal when they are ending in a way other parts can wait for, and track turns left unfinished\n\n**Unclear.** What this changes in how a session ends for a user is not shown.\n\n**What**\n\nA session is one run of Claude Code. For sessions run without the interactive screen or remotely, a request to end the session is now something other parts of Claude Code can wait for, rather than a simple yes-or-no marker. Claude Code also now tracks whether a batch of work was left unstarted, whether loading organizations failed, and whether a session was left in the middle of a turn.\n\n**Why**\n\nShutdown of these sessions can now be awaited, which may affect how a turn that is still running comes to an end.\n\n- Area: Headless Mode\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}