Repository navigation
fix(subagents): owner subagent results dropped after the owner sends a followup message - #167047
Oldrich333 wants to merge 1 commit into
Conversation
…p message A later direct turn revokes pending yield authority. For the gateway owner with admin scope and no role or model policy, the captured operator authority restricts nothing the no-operator dispatch allows, so the revoked batch takes the existing no-operator path instead of throwing 'Requester operator authority is no longer current'. Narrower operators stay fail-closed. Related: openclaw#162761
|
🦞👀 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 real behavior proof before merge. What this changesThe branch allows subagent completion dispatch to continue without captured operator authority when the original requester was an administrator Gateway owner without role or model restrictions. Example: An authenticated Gateway owner sends a followup while yielded subagents are running.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 10 items remain This PR addresses a corroborated problem still present on current main, but needs real behavior proof before merge and introduces a bypass of genuine owner-authority revocation. Priority: P1 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherNative subagents return completed work to the parent conversation through a completion wake. The authority handoff carries the original requester's permissions into that resumed parent turn. flowchart TD
A[Authenticated requester] --> B[Parent starts subagents and yields]
B --> C[Captured requester authority]
D[Followup or access revocation] --> C
E[Finished child batch] --> F[Completion authority check]
C --> F
F --> G[Reject invalid authority]
F --> H[Resume parent conversation]
Technical reviewBest possible solution: Preserve the original live requester authority across verified same-principal followups at admission, while keeping genuine source revocation and session, cohort, cancellation, and final-effect fences intact. Do we have a high-confidence way to reproduce the issue? Yes, source establishes that direct user admission discards pending authority and current main rejects its later completion dispatch; official-release reports corroborate that sequence. No runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? No. Falling back after any currentness failure conflates ordinary followups with actual access loss; retaining verified original authority at the admission boundary is safer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a9d68fff897f. Merge-risk optionsMaintainer options:
TestingProof path: unit tests only. SecurityNeeds attention: The owner fallback removes a live authorization fence after genuine source revocation; no dependency or supply-chain changes are introduced. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +17, Tests +70. Total +87 across 2 files. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label 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 Reviewed October 8, 2026, 3:58 AM ET / 07:58 UTC. |
Related: #162761
What Problem This Solves
Fixes: the gateway owner's finished subagent results are dropped with
Requester operator authority is no longer currentwhen the owner sends another message in the same conversation while the subagents still run.User Impact
User impact: an owner who keeps chatting while helpers work gets their results delivered instead of a silently stalled conversation. Operators with a role policy, a model policy, narrower scopes or a non-owner profile keep today's fail-closed refusal.
Why This Change Was Made
revokeRequesterCronAuthority); an operator-captured batch then throws inwithRequesterCronAuthority(!current()branch), while a batch without a captured operator takesrun()in the same branch and is delivered.gateway-ownerwithoperator.adminand no role or model policy is captured, but that authority restricts nothing the no-operator dispatch allows. Taking the existing no-operatorrun()for exactly that authority grants nothing new.private completion requester session was replaced), cohort and incarnation checks still apply.Evidence
it.eachinsrc/agents/subagents/requester-cron-authority.test.ts: yield captured from an operator turn →revokeRequesterCronAuthority(SESSION)(the later direct turn) → dispatch. Unrestricted owner delivers; owner without admin, owner with a role policy, owner with a model policy, and a named profile with admin all still throw.unrestricted gateway ownercase fails (1 failed | 36 passed); with it,37 passed.requester-cron-authority(14 files) →passed 5 Vitest shards, 344 tests.pnpm test src/agents/subagents/requester-cron-authority.test.ts --maxWorkers=1: cold 34.4 s, warm 11.1 s. CI duration: unavailable (no CI log found for the file on recent main commits).run-tsgotsconfig.core.json,test/tsconfig/tsconfig.core.test.agents-other.json,…agents-sessions.json: 0 errors.oxfmt --check,oxlinton both files: clean.