{"version":"2.1.234","anchor":"saved-loop-state-is-checked-before-a-session-resumes-it","canonical_anchor":"saved-loop-state-is-checked-before-a-session-resumes-it","heading":"Saved loop state is checked before a session resumes it","tier":"internal","area":"Sessions","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234\/e\/saved-loop-state-is-checked-before-a-session-resumes-it","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234","markdown":"### Saved loop state is checked before a session resumes it\n\nResuming a session now validates and trims stored loop state before reusing it.\n\n**What**\n\nWhen a session resumes, the stored state for a running loop is now parsed and rejected unless the condition is a string and the iteration count, timestamp and starting token count are all non-negative whole numbers. Valid state is truncated before use: the condition to 4000 characters and the last-reason text to 512.\n\n**Evidence**\n\n`tokens_at_start`\n\n- Area: Sessions\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5"}