{"version":"2.1.327","anchor":"remote-session-exit-reason-session-ended-handled","canonical_anchor":"remote-session-exit-reason-session-ended-handled","heading":"Remote sessions that end with session_ended now exit cleanly","tier":"notice","area":"Sessions","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/remote-session-exit-reason-session-ended-handled","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Remote sessions that end with session_ended now exit cleanly\n\nWhen a remote session ends with the reason session_ended, Claude Code now exits with code 0, meaning success\n\n**What**\n\nWhen a remote session stops, Claude Code turns the reason it was given into an exit code, the number a program reports when it finishes. The reason `session_ended` is now handled the same way as `tool_host_ended` and `idle_released`, with exit code 0, which means a normal, successful exit.\n\n**Why**\n\nScripts that start remote or headless sessions see a clean exit in this case rather than a failure.\n\n- Area: Sessions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}