Repository navigation
fix: subagent results stop returning after a follow-up - #168068
Conversation
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: ad538aef-a302-4991-8103-15845deb8dc3
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR lets accepted subagent results return after a requester follow-up while preserving the original caller’s restrictions. Example: A requester sends “Same human follow-up” while waiting for a child.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a current completion-delivery bug through the existing registry owner, with no actionable findings. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe subagent registry retains accepted child results and completion authority, then dispatches a Gateway continuation into the original requester conversation. flowchart TD
A[Requester turn] --> B[Accepted child work]
B --> C[Registry completion custody]
D[Requester follow-up] --> E[Retire automation handoff]
C --> F[Validate original live source]
F --> G[Gateway requester continuation]
G --> H[Persist input and start execution]
Technical reviewBest possible solution: Keep completion authorization solely in registry custody while automation management retains its separate turn-revocation contract. Do we have a high-confidence way to reproduce the issue? Current-main direct-turn admission revokes the automation-owned authority that later vetoes completion; official-release traces corroborate this mechanism, and the supplied revert control fails with the same error. Is this the best way to solve the issue? The repair removes the duplicate veto at its owner and preserves original-source restrictions through the existing completion path, avoiding owner exceptions or borrowed permissions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7008414e344e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -103, Tests +237, Docs +3. Total +137 across 6 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 9, 2026, 10:28 PM ET / October 10, 2026, 02:28 UTC (Revision 2). |
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 6d794c46-c2db-45a4-b16f-af900efcd22b
|
* fix: subagent results stop returning after a follow-up Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: ad538aef-a302-4991-8103-15845deb8dc3 * fix: subagent results stop returning after a follow-up Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 6d794c46-c2db-45a4-b16f-af900efcd22b --------- Co-authored-by: steipete <[email protected]>
* fix: subagent results stop returning after a follow-up Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: ad538aef-a302-4991-8103-15845deb8dc3 * fix: subagent results stop returning after a follow-up Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 6d794c46-c2db-45a4-b16f-af900efcd22b --------- Co-authored-by: steipete <[email protected]> (cherry picked from commit 75510a2)
Closes #162761
Related: #167047 — @Oldrich333’s existing owner-only proposal. This repair covers named operators as well, without adding an owner exception or changing that contributor’s branch.
What Problem This Solves
Fixes successful subagent results failing to return when the requester sends a follow-up while the parent is waiting.
User Impact
Users can continue the conversation without losing accepted child results. Results retain the original caller’s permissions; real source revocation, reset, cancellation, and foreign-requester protections remain enforced. No configuration or storage migration is required. This does not replay historical failed deliveries or deploy to a running Gateway.
Why This Change Was Made
The automation-management handoff also retained a second copy of general operator authority. A new user turn correctly retired automation privileges but inadvertently made that second copy veto result delivery. Remove the duplicate capture, retention, revocation tombstone, and dispatch wrapper: the existing registry completion-custody owner already checks and carries the original source around the actual settle dispatcher. Its fail-closed source checks and tombstones remain intact.
Production diff: +15 / −118 = −103 lines. Tests and documentation are counted separately. The paired regression reuses the existing registry fixture through a coherent sibling support module; no additional Gateway boot, sleep, or polling was added.
Evidence
Final Gateway-effect proof (acee199)
The follow-up now reaches the real in-process Gateway requester continuation and SQLite effects. Only provider inference is mocked; announcement dispatch is not substituted in this fixture. The paired cases reuse the existing suite-level Gateway.
The forbidden case also leaves no accepted idempotency entry and no model call. It fails with
Original completion source revoked during dispatch, after entering the real input-staging path and before effects.Revert control: replacing only the production owner with its pre-fix version makes the same-human final-effect case fail with
Requester operator authority is no longer current(64.38 s wall). Restoring the fixed owner preserves all six passing cases; production source is byte-identical to the previously reviewed fix.pnpm test src/gateway/server.requester-pause-authority.test.ts --maxWorkers=1: 73.38 s wall. Gateway-server test types, targeted type-aware lint, formatting, line-cap, timeout-race and mock-export checks passed. Fresh P0–P2 autoreview of this test-only addition: scoped-clean. Hosted CI seconds remain pending.Earlier implementation proof
pnpm test <seven focused files> --maxWorkers=1wall time: 239.60 s.pnpm build: passed, 360.18 s wall. Core production types and all 27 core test typecheck graphs passed. Targeted type-aware lint: 0 warnings, 0 errors. Formatting, line-cap, assertion, SQLite-worker, mock-export, dependency, and other completed guards passed.isTelegramReadOnlyControlLaneTextinextensions/telegram/src/sequential-key.ts,buildDirectChatContextinsrc/auto-reply/reply/groups.ts, and theresolveContextTokensre-export insrc/auto-reply/reply/model-selection.ts. All three files are unchanged by this patch; inspection of the pinned base shows no external production consumers of those exports (the latter two have test-only consumers). This is not reported as a green full check. Remaining selected static checks were run separately, without suppressing the failed scan. The three baseline exports have since been repaired on main by PR #168048, merged October 10 at 01:18 UTC.The initial registry proof uses an announcement stub; the final Gateway proof above does not. Both use synthetic identities and isolated state, not a live production conversation. No production state was changed.
Worked on by
Work sessions
View the OpenClaw team session