Repository navigation
Commit c8ecd1f
test(server): reproduce a follow-up task finishing while the child's subagent still runs
A parent sent its delegated child a follow-up with t3_thread_send. The
child's run started a native background subagent and ended. The follow-up
task got the run's interim reply as its result and the parent was told it
completed while the subagent kept running (pingdotgg#16603, the report from
jamesvillarrubia).
finalizeAppOwnedSubagent holds only the child's original task on
delegatedTaskProgress. A follow-up finalizes as soon as its own run ends,
and task_status and delegatedTaskResultPending take the same shortcut. The
new test seeds that sequence and fails today. It is quarantined under pingdotgg#16603
because a fix has to change all three places and route the later wake to the
same follow-up, which is what upstream pingdotgg#21877 does. Holding finalization
alone would still hand the parent the interim reply as the result.
The other cases from pingdotgg#16603 do not reproduce on this branch, and nothing
changes for them:
- Original task, nested native subagent still running: held until it ends,
covered by "finalizes a child whose run ended before a nested subagent
settled".
- Original task, background command still running: held while the command
is marked awaited with t3_background_wait, covered by "finalizes a child
whose run ended before a background command settled" and the awaited rows
in SubagentProjection.test.ts. An unmarked command does not hold the task
on purpose (pingdotgg#24610, pingdotgg#27468), so a child that leaves a dev server running
still finishes. Counting every active command_execution turn item would
undo that rule.
Refs pingdotgg#16603.
Written with Claude Opus 5.5 in Claude Code (T3 Code).
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 0420d6e commit c8ecd1f
1 file changed
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2400 | 2400 | | |
2401 | 2401 | | |
2402 | 2402 | | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
2403 | 2506 | | |
2404 | 2507 | | |
2405 | 2508 | | |
| |||
0 commit comments