{"version":"2.1.246","anchor":"headless-idle-detection-now-waits-for-background-tasks-and-u","canonical_anchor":"headless-idle-detection-now-waits-for-background-tasks-and-u","heading":"Headless idle detection now waits for background tasks and undelivered notifications","tier":"notice","area":"Headless Mode","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/headless-idle-detection-now-waits-for-background-tasks-and-u","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Headless idle detection now waits for background tasks and undelivered notifications\n\nHeadless runs no longer look finished while background tasks or undelivered notifications remain.\n\n**What**\n\nIn print\/headless mode, the check that decides a session has gone idle previously only looked for no active turn and nothing in flight. It now also requires no live background tasks, no active team context, and no pending task notification, so a headless run with background work or an undelivered task notification no longer looks finished.\n\n**Details**\n\n- Idle is computed from the current task list plus outstanding waits and the current time, and reported under the existing `cli_idle_gate_report_idle` event.\n- Extra diagnostics on this path are only emitted when the environment variable `CLAUDE_CODE_BG_TASKS_REPORT_RUNNING` is set.\n- The plugin and agent registry refresh function now takes an options bag that it forwards to the agent-definition loader.\n\n**Evidence**\n\n`cli_idle_gate_report_idle`\n\n- Area: Headless Mode\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5"}