{"version":"2.1.219","anchor":"turn-state-extracted-into-a-reusable-factory","canonical_anchor":"turn-state-extracted-into-a-reusable-factory","heading":"Turn state extracted into a reusable factory","tier":"internal","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219\/e\/turn-state-extracted-into-a-reusable-factory","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219","markdown":"### Turn state extracted into a reusable factory\n\nThe per-turn bookkeeping in the query loop was restructured with no change you can see.\n\n**What**\n\nThe per-turn accumulator used by the query loop is now built by a factory rather than assembled inline. No user-visible behaviour changes.\n\n**Details**\n\n- the accumulator holds assistant messages, tool results, `tool_use` blocks, and the follow-up, end-turn, prevent-continuation and deferred flags\n- `reset` can optionally keep assistant messages\n- `rebuildStreamingToolExecutor` re-creates the streaming tool executor from the injected constructor\n\n**Evidence**\n\n`rebuildStreamingToolExecutor`\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5"}