Skip to content

feat(coding-agent): add child-to-parent escalation reports - #117

Merged
Issacboy123 merged 2 commits into
feat/delete-owned-subagent-sessionsfrom
feat/enable-subagent-escalations
Aug 28, 2026
Merged

Issacboy123 merged 2 commits into
feat/delete-owned-subagent-sessionsfrom
feat/enable-subagent-escalations

Conversation

@Issacboy123

Copy link
Copy Markdown
Contributor

Summary

This PR lets a running child alert its parent about important information before the child finishes. A child can report a blocker, risk, contradiction, or decision that may change the parent's plan. Reports reach only the correct parent, stay within fixed size limits, and can be saved for the next parent turn without starting a new provider request while the parent is idle.

This PR is stacked on feat/delete-owned-subagent-sessions, the completed persistent-subagent stack.

Reasoning

Controller-issued capabilities bind delivery to the exact current child record and live session, preventing a stale or same-name replacement child from selecting or reaching a recipient. A private child-tool injection lane keeps the tool unavailable to root and standalone SDK sessions while reserving its name from public custom tools. Reusing the root's existing FIFO steering and JSONL custom-message paths preserves established ordering and persistence behavior; active queued reports remain non-durable until delivery, and hidden delivery does not imply secrecy.

Changes

  • Added the strict child-only escalate_to_parent tool with a 1,000-character message limit and acknowledgement that does not echo submitted content.
  • Reserved the tool name from public custom tools and injected it only into controller-created fresh, restored-wake, and replacement-wake child sessions.
  • Bound escalation callbacks to the exact current controller record and live running session, with rejection across reset, replacement, shutdown, and stale capability use.
  • Added hidden FIFO active delivery with acceptance-ordered coalescing, one continuation per envelope, and sealing when the queued message enters parent context.
  • Added non-triggering idle delivery through synchronous selected-branch append with in-memory rollback and isolated post-admission listener failures.
  • Enforced an 8,000-character aggregate pending limit across active and idle reports, including release and branch-filtering behavior.
  • Added root guidance that treats escalation content as untrusted delegated-agent data and focused authorization, delivery, persistence, rollback, and backpressure tests.

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 feat/enable-subagent-escalations branch from 5fa9e99 to 12d999e Compare August 25, 2026 14:36
@Pepps233
Pepps233 force-pushed the feat/enable-subagent-escalations branch from 12d999e to 400d2ec Compare August 25, 2026 16:42
@Pepps233
Pepps233 self-requested a review August 25, 2026 16:50
@Issacboy123
Issacboy123 force-pushed the feat/enable-subagent-escalations branch from 400d2ec to d9d0cd4 Compare August 27, 2026 10:54
@Issacboy123
Issacboy123 force-pushed the feat/enable-subagent-escalations branch from d9d0cd4 to 81e863a Compare August 27, 2026 23:11
@Issacboy123
Issacboy123 merged commit e75bd93 into main Aug 28, 2026
2 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