senpi icon indicating copy to clipboard operation
senpi copied to clipboard

[5.1.34] Child task reports completed while its own background jobs are still running (Progress line treated as terminal)

Open Bearmancer opened this issue 1 month ago • 3 comments

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

  1. Start a child task that spawns detached background work or terminal session.
  2. Observe child task settlement upon agent_idle.
  3. 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

Bearmancer avatar Oct 16 '26 23:10 Bearmancer

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.

Bearmancer avatar Oct 18 '26 18:10 Bearmancer

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.

Bearmancer avatar Oct 18 '26 19:10 Bearmancer

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.

code-yeongyu avatar Nov 02 '26 11:11 code-yeongyu