if (!sawActiveDescendants) { // No active descendants and none were observed before the call – nothing to wait for. return initialReply;
}
// Wait until no descendant runs remain active. Descendants can finish and // spawn more descendants, so the helper refreshes the run set until it drains.
await waitForAgentRunsToDrain({
deadlineAtMs: deadline,
initialPendingRunIds: initialActiveRuns.map((entry) => entry.runId),
getPendingRunIds: () => getActiveRuns().map((entry) => entry.runId),
});
// --- Grace period: wait for the cron agent's synthesis --- // After the subagent announces fire and the cron agent processes them, it // produces a new assistant message. Poll briefly (bounded by // finalReplyGraceMs) to capture that synthesis. const gracePeriodDeadline = Math.min(Date.now() + timings.finalReplyGraceMs, deadline);
while (Date.now() < gracePeriodDeadline) { const latest = await resolveUsableLatestReply(); if (latest) { return latest;
}
await new Promise<void>((resolve) => setTimeout(resolve, timings.gracePollMs));
}
// Final read after grace period expires. const latest = await resolveUsableLatestReply(); if (latest) { return latest;
}
return undefined;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.