Wire unresolved delegation into one bounded parent resume #238
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm!238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rage/172-parent-resume-replan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Advances #172.
RAGE slice
Started from exact canonical
main267697bef10a3fffff7c093e1435ece770e7444bafter re-enumerating the complete open issue/PR backlog and excluding active transactions #132, #212/#221, #213, #225, #228, #233, and #237.The remaining #172 defect is orchestration, not missing delegation primitives: merged tests manually compile/register/execute an
unknownbinding and manually observe the child result, but no generic runtime boundary connected unresolved trigger -> authenticated command -> canonicalrlm_subagent-> successful child result -> one parent continuation.Analyze / design
rlm_delegation_runtime:delegation_resume/10is the narrow generic composition boundary. It:prompt_command_compile/3;rlm_agentstate instead of accepting a caller-supplied capability claim;rlm_subagent_register_command/8in an ephemeral canonicalrlm_toolregistry;prompt_command_execute/6;subagent_result{status:completed,...}as resumable;delegation_resume_inputevidence;ok(Value)orerror(Error);No second selector, command executor, scheduler, agent runtime, authority path, or product-specific loop is introduced. Model/KB data never becomes a callable term. The continuation closure is a trusted host input, not model data.
Adversarial review
The first green candidate exposed an unnecessary authority risk during review: it accepted
ParentCapabilitiesas an API argument. Although canonical child spawning would still narrow against the actual parent, a caller could have overstated the parent capability set used by typed command dispatch. That design was rejected before promotion.The current implementation removes that input entirely.
delegation_resume/10obtains the actual parent's capabilities throughagent_status/3immediately before command compilation/dispatch. The capability-denial regression therefore exercises authoritative runtime state, not a caller-provided list.Other reviewed failure modes:
tool(rlm_subagent)cannot dispatch and makes zero continuation calls;rlm_agent/rlm_subagentsemantics;setup_call_cleanup/3.Decision gate: GO for this bounded generic-runtime slice.
Deterministic contract
The existing canonical
rlm_prompt_commandsuite now covers:rlm_subagent, preserves reviewer/rlm-factsprovenance and child capability narrowing, and resumes exactly once;Negative behavior is asserted as expected structured failure while the suite stays green; there is no intentional-red/xfail/skip path.
The new public contract is documented in
docs/delegation-runtime.md.Coordination
rlm_subagent.pl.rlm_tool.pl.a0-symbolicsremains a thin downstream consumer; Agent Zero product/plugin behavior stays there.agentPrologretains product/frontend/DeepSeek Harness composition; generic delegation orchestration stays upstream here.Exact-head verification
Exact candidate head:
9f41aa302a1772272c2d3d8c4d3aefede27cdb48.All returned canonical workflows are completed successfully on this exact head:
Current PR review submissions, conversation comments, and unresolved review threads are empty.
mainis still the exact starting SHA above and GitHub reports this PR mergeable.Remaining #172 scope
This slice closes the previously manual parent-resume composition gap. Reconciliation of the parent issue should still distinguish this one bounded continuation primitive from broader autonomous recursion-policy choices; no downstream product loop is added here.