fix(server): an empty Claude roster level no longer finalizes a delegated child early

The previous guard only kept an exited background command published when its
task_notification was buffered. Claude's empty background_tasks_changed level can
arrive before or after that notification (the SDK leaves the order unspecified),
and it published the empty roster straight away.

While idle, a roster update now keeps any published task Claude still owes a wake
run (wake-eligible or tombstoned). Only the published roster keeps it, so query
replacement still sees the cleared internal roster; the wake run's finalize, an
interrupted turn, or a process reset publishes it away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0a26c94c75Julius Marminge committed on 10/24/2026, 10:29:44 AMparente362ada

Checks

Some checks failed
2 files changedLine totals unavailable