# fix\(server\): an empty Claude roster level no longer finalizes a delegated child early · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/0a26c94c757e685e910fb3df4390efcebfadbc8a)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 0a26c94c757e685e910fb3df4390efcebfadbc8a

Requested commit: 0a26c94c757e685e910fb3df4390efcebfadbc8a

Commit: 0a26c94c757e685e910fb3df4390efcebfadbc8a

Tree: fc6ee96da72b5e8abc940ad63f49386384aca2d6

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
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>

```

## Parents

- [e362ada9c11af4cb6c216b150eff3c4acd9d9b7e](https://git.cafe/pingdotgg/t3code/commit/e362ada9c11af4cb6c216b150eff3c4acd9d9b7e?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/0a26c94c757e685e910fb3df4390efcebfadbc8a?format=markdown)
