Skip to content

fix(agents): run reply hooks for restart recovery - #115711

Merged
vincentkoc merged 1 commit into
mainfrom
fix/reply-payload-hook-restart-recovery-20260729
Jul 29, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/reply-payload-hook-restart-recovery-20260729

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

Closes #90282

Supersedes #90300 because that PR is closed, its contributor fork is not maintainer-editable, and the current-main fix includes the restart-recovery path needed for complete proof.

What Problem This Solves

Restart-recovered main-session replies could enter durable delivery without the existing reply_payload_sending hook metadata. Channel plugins therefore could not observe, rewrite, cancel, or fallback-deliver those recovered final replies before the channel adapter ran.

Why This Change Was Made

The current-main rewrite carries the existing reply hook through the real recovery path:

restart recovery -> agent command dispatch -> durable delivery -> reply_payload_sending -> channel adapter

It reuses the established durable outbound hook field and changes no recovery event, plugin API, session schema, or delivery queue schema.

User Impact

Recovered final replies now honor the same outbound reply-hook contract as normal agent-command delivery. Channel plugins can rewrite or cancel the payload before transport delivery.

Evidence

Exact head: fff952f86d10cd44fdd5dedfee22cae2378211cd

Publication baseline: 198e702642ecdb934d699d726d62995bbf054b04

  • Restart-recovery path suite: 139 tests passed.
  • Agent-command delivery suite: 51 tests passed.
  • Real path proof reached durable delivery, invoked reply_payload_sending, applied the rewrite, and delivered the rewritten payload to the channel adapter.
  • Formatting, oxlint, MDX, conflict markers, and git diff --check passed.
  • Fresh branch autoreview: clean.

The broad local tsgo lane was blocked by a stale shared @openclaw/session-url-contract/parse workspace link, and Blacksmith Testbox was not authenticated. Exact-head CI remains the authoritative broad gate.

Release-note context is captured in this PR body; root CHANGELOG.md stays release-owned.

The maintainer successor preserves @sweetcornna as co-author.

@vincentkoc vincentkoc self-assigned this Jul 29, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Jul 29, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 29, 2026 07:00
@vincentkoc
vincentkoc force-pushed the fix/reply-payload-hook-restart-recovery-20260729 branch 3 times, most recently from 0ba5a6e to 853b50d Compare July 29, 2026 07:46
@vincentkoc
vincentkoc force-pushed the fix/reply-payload-hook-restart-recovery-20260729 branch from 853b50d to fff952f Compare July 29, 2026 08:17
@vincentkoc
vincentkoc merged commit 5578f27 into main Jul 29, 2026
123 of 126 checks passed
@vincentkoc
vincentkoc deleted the fix/reply-payload-hook-restart-recovery-20260729 branch July 29, 2026 08:32
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main:
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
  fix(msteams): finalize sent replies after dispatch (#82354)
  fix(cron): deliver explicitly configured failure alerts (#115762)
  fix(hooks): resolve inbound claim conversation once (#115491)
  refactor: retire legacy provider and secret paths (#115655)
  fix(memory): reject malformed QMD result entries (#115705)
  fix(diagnostics): keep internal thinking out of telemetry [AI] (#115261)
  fix(ui): localize remaining control surfaces (#115730)
  fix(gateway): prevent model owner mismatch after plugin activation (#115747)
  fix(agents): run reply hooks for restart recovery (#115711)
  fix(cron): initialize detached hook run sessions (#115765)
  fix(ios): keep stop available for staged voice notes (#115744)
  fix(doctor): preserve config includes during cleanup (#115723)
  fix(memory): keep dreaming consolidation within project scope (#115721)
  fix(discord): keep tool rows under verbose progress (#111947)

# Conflicts:
#	ui/src/pages/custodian/custodian-surface.ts
#	ui/src/styles/custodian.css
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restart-recovery 不触发 reply_payload_sending event,导致渠道插件丢失回复

1 participant