fix: report remaining subsessions on completion

This commit is contained in:
Federico Jaramillo Martinez
2026-07-13 23:41:20 +02:00
parent d5154dfb3a
commit 0761e1509a
7 changed files with 115 additions and 63 deletions
+8 -10
View File
@@ -542,19 +542,17 @@
clearly reports that there is nothing to wait for.
</p>
<p>
A completion notice automatically wakes an idle parent. If the parent is busy, the notice queues until
the current turn ends rather than interrupting in-flight work. When multiple children finish at
different times, the parent handles each completion and calls <code>yield_to_subsessions</code> again
while another child is still working.
A completion notice wakes an idle parent or queues behind in-flight work. Each notice lists any other
tracked children still working, so the parent can continue work or call
<code>yield_to_subsessions</code> again at the next join point. Further notices arrive automatically; do
not poll.
</p>
<p>
<code>list_subsessions</code>, <code>check_subsession</code>, and <code>read_subsession</code> never yield
or change control flow and are not completion-polling mechanisms. They remain available for deliberate
inspection or recovery. While a child is working, agent-facing <code>check_subsession</code> and
<code>read_subsession</code> withhold partial output and transcript entries and instead direct the parent
to continue independent work or yield at the join point. Once the child is no longer working, its output
and transcript are available. Completion notifications, rather than polling inspection tools, are the
normal synchronization mechanism.
or change control flow. They are for deliberate inspection or recovery, not completion polling. While a
child works, agent-facing <code>check_subsession</code> and <code>read_subsession</code> withhold partial
output and direct the parent to continue independent work or yield at the join point. Output becomes
available when the child stops.
</p>
<p>
In <strong>Settings → Session daemon</strong>, these keys are saved on the selected machine. Restart the