Repository navigation
fix(hooks): preserve multi-account agent delivery - #116095
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 6:55 PM ET / 22:55 UTC. ClawSweeper reviewWhat this changesThe PR accepts and normalizes Merge readinessThis protected, member-authored PR appears to repair the reported multi-account hook-delivery loss through the existing delivery object; the prior dispatcher-handoff blocker is addressed on the latest head, so it should remain open for maintainer merge review rather than cleanup automation. Priority: P1 Review scores
Verification
How this fits togetherAgent hooks accept authenticated webhook requests, normalize optional direct-delivery fields, and schedule an isolated agent run. The scheduled run uses the normalized delivery object to choose a channel, recipient, and configured channel account for its outbound announcement. flowchart LR
A[Webhook caller] --> B[Agent hook endpoint]
B --> C[Payload normalization]
C --> D[Direct delivery object]
D --> E[Scheduled agent run]
E --> F[Channel account resolution]
F --> G[Outbound message]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +27, Tests +174, Docs +2. Total +203 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one canonical normalized delivery object from hook admission through scheduled dispatch, reject incomplete selected-account destinations before admission, and merge only after a maintainer accepts that explicit validation contract. Do we have a high-confidence way to reproduce the issue? Yes, from source and the supplied QA Lab scenario: submit a direct agent hook with explicit Is this the best way to solve the issue? Yes. Carrying the normalized field on the existing delivery object is narrower and safer than reconstructing routing later in the dispatcher or rerouting hooks through a separate cron-normalization path. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against daaaef95f093. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
11c64b5 to
648840e
Compare
|
Exact head is now The release-owned Maintainer decision remains: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
648840e to
525d63b
Compare
|
Exact head is now The previous CI failure was valid: the QA Lab E2E imported plugin internals from a core test path. The proof now lives under the owning Reproof:
The previously recorded maintainer decision remains unchanged: incomplete @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Refs #43866 Co-authored-by: Paul Desmond Parker <[email protected]>
525d63b to
f1720a2
Compare
|
Exact-head refresh: The branch is rebased onto current Fresh proof:
Maintainer decision remains unchanged: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer refresh at exact head I verified the reported P1 against the full dispatcher path and did not add duplicate runtime plumbing:
The suggested runtime reconstruction would create a second source of truth for the same destination. I kept the canonical path and added a focused dispatcher-boundary regression assertion instead. Exact proof:
This head therefore addresses the review concern with source-path proof plus behavior proof, without widening the runtime diff. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
|
Post-land overlap audit complete.
The fresh linked-worktree QA Lab retry stopped before runtime assertions because that worktree had no built |
* fix(hooks): preserve account routing for agent delivery Refs openclaw#43866 Co-authored-by: Paul Desmond Parker <[email protected]> * test(gateway): prove hook account delivery handoff --------- Co-authored-by: Paul Desmond Parker <[email protected]>
Closes #43866
Related: #43951
What Problem This Solves
Fixes an issue where
POST /hooks/agentsilently discardedaccountId, causing direct announce delivery to use the wrong configured account or fail on multi-account channels.Why This Change Was Made
The hook payload now validates and preserves
accountIdalongside its explicitchannelandto, then carries it through the existing direct announce delivery contract. The change stays within hook normalization and dispatch; it does not rewrite cron normalization or message-tool policy.The original contributor PR cannot be updated because its closed fork branch has maintainer edits disabled and rejects maintainer pushes. This replacement preserves Paul Desmond Parker's contribution through a co-author trailer.
User Impact
Webhook callers can select a configured channel account for direct agent-hook delivery. Invalid or incomplete
accountIddestinations fail before a run is scheduled instead of being silently ignored.Evidence
525d63baeffecb7bbfab888b6c7e2be6131fa8cc.qa-channelaccountwork, with zero messages throughdefault.oxfmt,oxlint, andgit diff --checkpassed.extensions/qa-lab.CHANGELOG.mdremains release-owned.