{"version":"2.1.285","anchor":"headless-resume-of-interrupted-turn-orphaned-task-flush-is","canonical_anchor":"headless-resume-of-interrupted-turn-orphaned-task-flush-is","heading":"Resuming after a worker restart now records whether task cleanup timed out","tier":"internal","area":"Background Tasks","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285\/e\/headless-resume-of-interrupted-turn-orphaned-task-flush-is","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.285","markdown":"### Resuming after a worker restart now records whether task cleanup timed out\n\nWhen Claude Code resumes an interrupted turn after a worker restart, cleanup of leftover background task notices is now timed and logged\n\n**Unclear.** The new time limit for this step is not known.\n\n**What**\n\nWhen a worker restarts partway through a turn, Claude Code can pick that turn back up. A background task is work Claude started that runs on its own, and some can be left behind by the restart. Before continuing, Claude Code sends out the pending notices about those leftover tasks. That step now:\n\n- Records whether it ran out of time.\n\n- Writes a log line and records how long it took.\n\n- Uses a set time limit instead of the previous fixed 20 seconds.\n\nIt also reads the lists of running, leftover and finished tasks correctly, where some of them were mixed up before. This path is tied to the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` environment variable.\n\n**Why**\n\nProblems after a remote worker restart are easier to trace, because the log now shows how long cleanup took and whether it gave up.\n\n- Area: Background Tasks\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}