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:
YeonGyu-Kim
2026-02-17 16:15:25 +09:00
parent 2541efb804
commit 2b09f3d3c9
2 changed files with 24 additions and 9 deletions
+1 -8
View File
@@ -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}`)
)