fix(cli-run): avoid infinite wait on missing child status
Treat child sessions missing from session.status as transient so completion polling can proceed while still blocking on explicit non-idle descendants.
This commit is contained in:
@@ -86,14 +86,7 @@ async function areAllDescendantsIdle(
|
||||
|
||||
for (const child of children) {
|
||||
const status = allStatuses[child.id]
|
||||
if (!status) {
|
||||
console.log(
|
||||
pc.dim(` Waiting: session ${child.id.slice(0, 8)}... status unknown`)
|
||||
)
|
||||
return false
|
||||
}
|
||||
|
||||
if (status.type !== "idle") {
|
||||
if (status && status.type !== "idle") {
|
||||
console.log(
|
||||
pc.dim(` Waiting: session ${child.id.slice(0, 8)}... is ${status.type}`)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user