Skip to content

Unblock fleet waits on interrupt and scope them to the caller - #679

Merged
TheGreatAxios merged 4 commits into
mainfrom
scope-fleet-wait-to-caller
Aug 25, 2026
Merged

Unblock fleet waits on interrupt and scope them to the caller#679
TheGreatAxios merged 4 commits into
mainfrom
scope-fleet-wait-to-caller

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • wait_agents with omitted targets waits on this caller’s own uncollected fleet, not every running session in the shared store.
  • interrupt_agent terminalizes the wait mailbox immediately (interrupted) so a parent wait cannot hang until timeout and retry forever.
  • Nested spawn_agent records parentSessionId so close_agent can walk descendants.
  • wait_agents accepts mode=all and treats a parent-turn abort like a timeout: workers keep running.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • New tests cover foreign-session exclusion, interrupt-unblocks-wait without the child settling, interrupted-run salvage, mode=all, and wait abort

wait_agents with omitted targets used the shared session store, so a
parent could block on siblings and leftover workers. interrupt_agent
never wrote the wait mailbox, so a wait after interrupt hung until
timeout and the parent retried forever.

Wait now uses this install's fleetRecords, interrupt terminalizes that
mailbox immediately, nested spawn_agent records parentSessionId, and
wait supports mode=all plus parent-turn abort.
@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

closeOne flips strip status to cancelled, which killed the soft-interrupt
fallback that still required status === running. Terminalize fleetRecords
on close (same owning layer as interrupt) and collect on the soft path so
omitted re-waits do not re-deliver.
@linear-code

linear-code Bot commented Aug 25, 2026

Copy link
Copy Markdown

CL-7063

@TheGreatAxios
TheGreatAxios merged commit 835c595 into main Aug 25, 2026
5 checks passed
TheGreatAxios added a commit that referenced this pull request Aug 27, 2026
* Unblock fleet waits on interrupt and scope them to the caller

wait_agents with omitted targets used the shared session store, so a
parent could block on siblings and leftover workers. interrupt_agent
never wrote the wait mailbox, so a wait after interrupt hung until
timeout and the parent retried forever.

Wait now uses this install's fleetRecords, interrupt terminalizes that
mailbox immediately, nested spawn_agent records parentSessionId, and
wait supports mode=all plus parent-turn abort.

* Require fleetRecords on interrupt and tighten fleet wait coverage

* Clarify mode=all interrupt test comment timing

* Unblock fleet waits when close_agent tears a worker down

closeOne flips strip status to cancelled, which killed the soft-interrupt
fallback that still required status === running. Terminalize fleetRecords
on close (same owning layer as interrupt) and collect on the soft path so
omitted re-waits do not re-deliver.
TheGreatAxios added a commit that referenced this pull request Aug 27, 2026
* Unblock fleet waits on interrupt and scope them to the caller

wait_agents with omitted targets used the shared session store, so a
parent could block on siblings and leftover workers. interrupt_agent
never wrote the wait mailbox, so a wait after interrupt hung until
timeout and the parent retried forever.

Wait now uses this install's fleetRecords, interrupt terminalizes that
mailbox immediately, nested spawn_agent records parentSessionId, and
wait supports mode=all plus parent-turn abort.

* Require fleetRecords on interrupt and tighten fleet wait coverage

* Clarify mode=all interrupt test comment timing

* Unblock fleet waits when close_agent tears a worker down

closeOne flips strip status to cancelled, which killed the soft-interrupt
fallback that still required status === running. Terminalize fleetRecords
on close (same owning layer as interrupt) and collect on the soft path so
omitted re-waits do not re-deliver.
@TheGreatAxios
TheGreatAxios deleted the scope-fleet-wait-to-caller branch August 28, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant