Skip to content

feat(coding-agent): resume coordinated waits for escalations - #119

Merged
Issacboy123 merged 4 commits into
feat/enable-subagent-escalationsfrom
fix/complete-subagent-coordination
Aug 28, 2026
Merged

Issacboy123 merged 4 commits into
feat/enable-subagent-escalationsfrom
fix/complete-subagent-coordination

Conversation

@Issacboy123

Copy link
Copy Markdown
Contributor

Summary

This PR makes child escalation reports useful while the parent is waiting for a group of subagents to finish. An important report can resume the parent so it can react, while the original child work continues and its final results remain scheduled for delivery. Cancellation, shutdown, repeated reports, and later child retries are handled without extra parent turns or duplicate results.

This PR is stacked on feat/enable-subagent-escalations, which provides child authorization and active or idle report delivery.

Reasoning

A single root-owned coordination object keeps the frozen batch, terminal notices, wait abort controller, and exit reason synchronized across multiple continuations. Treating escalation as a temporary wait exit rather than cancellation lets the root react while children continue, whereas cancellation remains authoritative and prevents an extra provider call. Gating terminal wake or message actions protects the frozen run until normal delivery or explicit consumption releases it.

Changes

  • Replaced the wait-only abort reference with persistent coordination state for the frozen batch and wait lifecycle.
  • Resumed the root for queued escalations without interrupting children or emitting a false wait end, then reblocked when work remained.
  • Processed successive reports without empty continuations and coordinated newly spawned or same-child retry batches after explicit result consumption.
  • Preserved running-child actions while rejecting terminal wake or message operations that would replace a frozen coordinated attempt.
  • Made cancellation and disposal suppress report-driven continuation, settle child work, clear pending delivery, and avoid terminal-result injection during shutdown.
  • Added focused coordination and persistence integration coverage for exactly-once results, action gates, successive reports, cancellation, disposal, reset invalidation, and ordinary hidden history.

Testing

  • node ../../node_modules/vitest/dist/cli.js --run test/suite/subagent-parent-messaging.test.ts test/suite/subagent-services.test.ts test/suite/subagent-registration.test.ts test/suite/subagent-actions.test.ts test/suite/subagent-coordination.test.ts test/suite/subagent-persistence.test.ts test/suite/agent-session-queue.test.ts test/subagent-controller.test.ts
  • npm.cmd run check
  • git diff --check

@Issacboy123 Issacboy123 self-assigned this Aug 25, 2026
@Pepps233
Pepps233 force-pushed the fix/complete-subagent-coordination branch from 1a1d9da to 6b083b4 Compare August 25, 2026 14:36
@Pepps233
Pepps233 force-pushed the fix/complete-subagent-coordination branch from 6b083b4 to 394b8f0 Compare August 25, 2026 16:42
@Pepps233
Pepps233 self-requested a review August 25, 2026 18:34
@Issacboy123
Issacboy123 force-pushed the fix/complete-subagent-coordination branch from 394b8f0 to 186e41e Compare August 27, 2026 10:54
@Issacboy123
Issacboy123 force-pushed the fix/complete-subagent-coordination branch from 186e41e to b0cca68 Compare August 27, 2026 23:11
@Issacboy123
Issacboy123 merged commit 194abed into main Aug 28, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants