You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(subagents): --print/--json parent can settle while required children are still running [under investigation] #512
Wiring landed on research branch research/openpi-cursor-reliability-20260908 @ 7950570 and PR #515. PR is not merged. Isolated evidence only. Not a formal Benchmark.
Impact
In pi --print / --mode json, a parent that calls subagent_spawn and then ends the turn emits agent_settled and the process exits. Automatic result delivery only helps an interactive TUI. Required child results are lost.
Evidence — same E task+acceptor, cursor-grok-4.6-high-fast
Receipts still say source=a3edee28 because the harness hardcoded that SHA. Split is by spawn-result text + attempt window. Index: /tmp/openpi-reliability-20260908/results/e-high-fast-512-version-split.md.
Window
Product behavior
n
Correct
E-01..10
stock v0.8.1 spawn (“end your turn” / auto re-invoke). E-06..10 are still this window, not after-fix.
10
7
E-11..20
print-host spawn from 7950570 (“MUST call subagent_wait”). All 10 stdout traces show that text.
10
10
E-01 spawn result (trimmed): “end your turn; its result is delivered automatically and you are automatically re-invoked”. E-11 spawn result: “This host cannot re-invoke you after you end the turn. You MUST call subagent_wait…”
Isolated bun run check exit 0 (results/isolated-bun-check.log) and bun run test exit 0, 1470 pass (results/isolated-bun-test.log).
Fix (on the research branch only)
buildSubagentSpawnResult({ canDeliverLater: false }) requires wait and does not say “end your turn”.
On agent_settled, if the host cannot deliver later and direct children are still running, send up to two followUp + triggerTurn barriers.
Do not disable tools, loosen permissions, or lengthen timeouts.
Applicability
OpenPI v0.8.1 subagent spawn/delivery. Not Cursor native-tool rejection (PR #484). Related hung-after-success: #516.
Isolated worktree now has a failing-repro-first helper plus wiring (not merged):
extensions/subagents/src/print-host.ts — TUI-only canDeliverLater, pending follow-up text
buildSubagentSpawnResult({ canDeliverLater: false }) requires subagent_wait and does not say “end your turn”
--print/json/rpc parent agent_settled with running direct children sends up to two followUp + triggerTurn barriers
Unit tests: tests/extensions/subagents/print-host.test.ts and the new prompt contract. Same E task+acceptor has 10 before-samples on v0.8.1 stock spawn text (3 print-settle failures, 7 waits). After-sample revalidation is in progress. No merge/release.
Before/after on the same E task+acceptor, cursor-grok-4.6-high-fast, isolated v0.8.1:
Before (stock spawn text): 7/10 correct, 3/10 print-settle wrong result (attempts 01–10).
After (print-host spawn text + bounded follow-up barrier): 10/10 correct (attempts 11–20). E-11 spawn result includes You MUST call subagent_wait and the model called Pi subagent_wait.
PR opened from research/openpi-cursor-reliability-20260908. Isolated bun run check + bun run test green. Not merged.
Activity
tt-a1i commentedon Sep 8, 2026
Isolated worktree now has a failing-repro-first helper plus wiring (not merged):
extensions/subagents/src/print-host.ts— TUI-onlycanDeliverLater, pending follow-up textbuildSubagentSpawnResult({ canDeliverLater: false })requiressubagent_waitand does not say “end your turn”--print/json/rpcparentagent_settledwith running direct children sends up to twofollowUp+triggerTurnbarriersUnit tests:
tests/extensions/subagents/print-host.test.tsand the new prompt contract. Same E task+acceptor has 10 before-samples on v0.8.1 stock spawn text (3 print-settle failures, 7 waits). After-sample revalidation is in progress. No merge/release.tt-a1i commentedon Sep 8, 2026
Before/after on the same E task+acceptor,
cursor-grok-4.6-high-fast, isolated v0.8.1:You MUST call subagent_waitand the model called Pisubagent_wait.PR opened from
research/openpi-cursor-reliability-20260908. Isolatedbun run check+bun run testgreen. Not merged.docs(research): record #512 version split and evidence-gap close