{"version":"2.1.281","anchor":"sdk-engine-lifecycle-for-failed-turn-setup-and-an-abandonm","canonical_anchor":"sdk-engine-lifecycle-for-failed-turn-setup-and-an-abandonm","heading":"SDK engine: lifecycle for failed turn setup, and an abandonment sweep","tier":"internal","area":"SDK","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/sdk-engine-lifecycle-for-failed-turn-setup-and-an-abandonm","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### SDK engine: lifecycle for failed turn setup, and an abandonment sweep\n\nThe SDK engine now reports turns that failed to start and cleans up waiting turns when it closes\n\n**What**\n\nThe SDK engine keeps a queue of turns waiting to run. Each waiting turn now has a status: `queued` (still waiting) or `armed` (next up and being set up).\n\n- If building a turn's settings fails, the turn now also sends a `cancelled` lifecycle report.\n\n- When the engine closes, a new sweep marks an armed turn `cancelled` and any queued turns `discarded`. It runs even if the engine never started processing. If the sweep fails, it logs \"[engine] abandonment sweep failed\".\n\n- The `still_queued` list returned by `interrupt()` now lists only turns still waiting, not the one already armed.\n\n**Why**\n\nA program using the SDK now gets a clear final status for every turn it asked for, instead of turns disappearing without a report when setup fails or the engine shuts down.\n\n- Area: SDK\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}