-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix orphaned model-wait subagents so Stop unblocks the awaiting parent #4408
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnesssubagentsSub-agent orchestration, lifecycle, and completion handlingSub-agent orchestration, lifecycle, and completion handlingtuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interactionv0.9.1Targeting v0.9.1Targeting v0.9.1
Milestone
Description
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnesssubagentsSub-agent orchestration, lifecycle, and completion handlingSub-agent orchestration, lifecycle, and completion handlingtuiTerminal UI behavior, rendering, or interactionTerminal UI behavior, rendering, or interactionv0.9.1Targeting v0.9.1Targeting v0.9.1
Projects
StatusShow more project fields
In progress
Summary
A delegated child can remain
Runninginmodel_waitafter a Responses API request fails, leaving the parent indefinitely atdelegate waiting · subagent.Observed in v0.9.0
visual-reviewchild remained at abefore_api_requestcheckpoint inmodel_wait.Runningagents are converted toInterrupted, but the independently loaded worker ledger can retain a non-terminalmodel_waitrecord. The UI can therefore continue to show a ghost active worker.Expected
Suggested work
Audit the work-surface stop/confirmation flow, request lifecycle, and restart restoration. Add regression coverage for a child that fails while awaiting a model request, then receives cancellation and is restored after an app restart.
Relevant areas:
crates/tui/src/tui/work_surface/interaction.rs,input.rs, subagent state persistence/reconciliation.