{"version":"2.1.271","anchor":"headless-printts-resume-path-adds-an-extra-safety-flush-b","canonical_anchor":"headless-printts-resume-path-adds-an-extra-safety-flush-b","heading":"Headless (print.ts) resume path adds an extra safety flush before reusing a stale interrupted-prompt cancel","tier":"notice","area":"Headless Mode","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/headless-printts-resume-path-adds-an-extra-safety-flush-b","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### Headless (print.ts) resume path adds an extra safety flush before reusing a stale interrupted-prompt cancel\n\nHeadless mode's resume logic adds an extra safety wait before reusing a stale cancelled prompt after a worker restart\n\n**What**\n\nIn headless (print) mode, when Claude Code resumes work after a worker restart, it now waits for an extra notification flush in one more case: when there are no orphaned background tasks, but there is a stale cancelled prompt or superseded tool calls left over, and the pending message was itself an interrupted prompt. This matches a flush that was already being done for the orphaned-background-task case.\n\n**Why**\n\nThis closes a gap where a resumed session could act on stale, already-cancelled state after a restart, making resume behavior more consistent between the two cases.\n\n- Area: Headless Mode\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5"}