Skip to content

fix(cron): initialize detached hook run sessions - #115765

Merged
vincentkoc merged 1 commit into
mainfrom
fix/hook-run-session-initialization-20260729
Jul 29, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/hook-run-session-initialization-20260729

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Related: #100486

What Problem This Solves

Fixes an issue where detached hook and current-bound cron runs could fail before producing a reply with Session transcript header was not persisted.

Why This Change Was Made

The isolated-run owner already selected an exact per-run session key for detached hook runs, but it initialized the matching continuation row only for cron: source keys. This change uses the same exact-run predicate for both key selection and row initialization, so transcript writes always target a persisted SQLite session row.

The repair is intentionally separate from #100486: that PR owns webhook delivery normalization, while this is a current-main cron/session lifecycle defect that also affects current-bound detached runs.

User Impact

Webhook-triggered agent runs and other detached isolated runs can persist their transcript and complete instead of failing at the first write.

Evidence

Exact head: 2cf6d8bf40a3d18886113ae8bbbcc486e86844ce

  • Pre-fix reproduction: ordinary cron transcript writes passed; a hook run failed with Session transcript header was not persisted.
  • node scripts/run-vitest.mjs src/cron/isolated-agent.session-identity.test.ts src/cron/isolated-agent/run-session-state.test.ts src/cron/isolated-agent.hook-content-wrapping.test.ts src/cron/isolated-agent/run.current-context.test.ts
    • 4 files, 35 tests passed.
  • Targeted oxfmt, oxlint, and git diff --check passed.
  • Fresh autoreview found no accepted or actionable findings (confidence 0.96).

@vincentkoc vincentkoc self-assigned this Jul 29, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 29, 2026 08:16
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 29, 2026
@vincentkoc
vincentkoc merged commit 02f7c7a into main Jul 29, 2026
177 of 183 checks passed
@vincentkoc
vincentkoc deleted the fix/hook-run-session-initialization-20260729 branch July 29, 2026 08:31
@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

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant