[5.1.34] Child task reports completed while its own background jobs are still running (Progress line treated as terminal)
What happened?
Child task reports completed while its own background jobs are still running (Progress line treated as terminal completion). Linked PRs: senpi#3651 (producer) + omo#12133 (consumer; successor of omo#10532, closed unmerged in favor of omo#12133 — first commit kept under Bearmancer)
Steps to reproduce
- Start a child task that spawns detached background work or terminal session.
- Observe child task settlement upon
agent_idle. - Note that task settles completed before background work finishes.
Expected behavior
Task settlement is held until background work wake source count reaches 0.
Version
5.1.34
The producer half of this report is up as #3651: the terminal background-session wake source (terminal-background-sessions) now mirrors onto the RPC channel, so an RPC host can observe that a child's own background jobs are still running after its turn ended. The consumer half (holding a completed outcome while a wake source is live) lives in the omo supervisor and needs this signal on the wire first.
The consumer half is now up as code-yeongyu/oh-my-openagent#10532: the supervisor holds a completed outcome while a wake_source_state source reports work in flight, and records the completion only after a settled probe with no pending source. Together with #3651's terminal background-session lane (and codemode's cell lane, already on the wire), both of a child's work sources are now observable end-to-end.
Thanks @Bearmancer for splitting this into a producer and a consumer half; that makes it much easier to review. Sorry this sat for a while. The producer side is in review in #3651, which is linked to this issue.