Repository navigation
[ENG-19421] feat(agents): channel-owned subagent completion replies and sequential sessions_yield - #205
Merged
Conversation
…enclaw#97657) (cherry picked from commit 75db48a)
… identity fields (openclaw#98835) * fix(config/sessions): narrow reply-session initialization revision to identity fields The initialization guard compared the full persisted session entry, so background touches to updatedAt, heartbeat timestamps, context-budget metadata, etc. produced false-positive stale-snapshot conflicts and the "reply session initialization conflicted" error. Only sessionId and sessionFile matter for detecting a session rotation. Narrow the revision to those identity fields and add a regression test. Fixes openclaw#98672 * fix(config/sessions): merge current metadata when reply-init identity guard passes * fix(config/sessions): preserve only snapshot-drifted metadata in reply-init commit * fix: preserve cleared reply-session metadata * fix: allow same-session reply initialization drift --------- Co-authored-by: moguangyu5-design <[email protected]> Co-authored-by: Josh Lehman <[email protected]> (cherry picked from commit 826c84e)
Subagent completion announcements into a threaded direct chat run in the automatic source-reply mode. A channel that renders its final reply from the message tool (suggested replies, audit trace) never sees that payload, and the NO_REPLY rewrite produces a plain duplicate row instead. Add an opt-in completion owner registry. A plugin registers one owner per channel through PluginRuntime.subagent.registerCompletionOwner. When the announce flow has a registered owner for the requester channel and the owner accepts the route, the assembled completion event is handed to the owner instead of the legacy delivery. Every non-match (no owner, other channel, requester is a subagent, expectsCompletionMessage false, not_handled) falls through to the unchanged legacy path. Persist the owner channel on the announce record. A resumed record that was claimed by an owner which is no longer registered fails retryably instead of falling back to legacy delivery, so a restart cannot produce a second visible row. Add activeRunPolicy "wait" to the reply run options so an owner-driven reply waits for the active run instead of steering or queueing a follow-up.
…nish The sessions_yield tool aborts the run from its execute callback. In a parallel tool batch the abort signal also rejects every sibling tool call still running, so a message send issued in the same assistant turn fails with "Operation aborted" and the channel reports a failed step. Mark the tool as sequential. The agent loop already executes a batch in order when any tool in it is sequential, so tool calls emitted before the yield complete before the abort fires. Batches without a yield are unchanged.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
…rt cycle The completion owner registry imported the message channel barrel and the announce output module for one normalizer and one type. Both paths reach the channel registry and gateway plugins, which import the registry back, so the architecture check reported a new import cycle. Import the leaf normalizer and declare the outcome shape locally.
There was a problem hiding this comment.
Review completed against the latest diff
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
…nce events The owner request read the event back out of a one-element array with a non-null assertion that the type-aware lint rejects as unnecessary.
The parent polls for the ready file with fs.access and then parses it. The child wrote it in place, so a poll landing between create and write read an empty file and failed with "Unexpected end of JSON input". Write to a temp path and rename it into place.
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
gabriel-tama
approved these changes
Sep 7, 2026
…rrel The plugin SDK surface budget caps public exports on the root entrypoint. The four completion owner types pushed it over the limit and the plugin reads them through the PluginRuntime type, so the root re-export is not needed.
…failure The owner path reported terminal failures but the deferred-cleanup decision only consulted the no-output drop reason, so a non-retryable owner result still re-ran the owner up to the retry limit. Record an owner_terminal drop reason and give up on it. Also tell the model to call sessions_yield last, and dispose the test owner registration in a finally block.
|
I'll analyze this and get back to you. |
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
…esume Without persisting, a gateway restart between the attempt and the deferred-cleanup decision lost the marker and re-ran the owner. Resume now gives up on owner_terminal the same way it does on subagent_no_output.
holywend
added a commit
that referenced
this pull request
Sep 8, 2026
`boon` moved while this release PR was open: #205 (channel-owned sub-agent completion replies, sequential sessions_yield) merged after the branch point. That commit ships in this release whether or not the branch merges it — the tag is cut from `boon` after this PR lands, so `boon` will contain both #205 and the version bump. Leaving the release notes as they were would have shipped a CHANGELOG that silently omitted a 39-file behaviour change. So: merged base, added #205 to the notes, and re-ran `pnpm release:prep`. `release:generated:check` had gone red on "Plugin SDK API baseline drift" — #205 touches `PluginRuntime`, `SubagentRunParams` and `SubagentRunResult` on the `core`, `index` and `runtime-store` entrypoints. Regenerating clears it. No new entrypoints, so the surface budget is untouched and needs no bump. Version propagation re-verified after the merge: root plus @openclaw/slack, @openclaw/msteams and @openclaw/diagnostics-prometheus all read 2026.6.11-boon.38.
4 of 6 tasks
orswn
added a commit
that referenced
this pull request
Sep 8, 2026
…206) ## Release 2026.6.11-boon.38 Ships channel-owned sub-agent completion replies for Boon web chat. ### Contents (merged onto `boon` since boon.37) - **#205 (ENG-19421)** — a plugin can register a completion owner for its channel; the announce flow hands the sub-agent completion to the owner and falls back to the existing delivery path when none is registered, so other channels are unchanged. `sessions_yield` runs its tool batch sequentially so a `message` send in the same turn is no longer aborted. Carries upstream openclaw#97657 and openclaw#98835 (`reply session initialization conflicted`). Smoke-tested on a local stack; evidence in #205. - **#202** — plugin-sdk read of the gateway live run count. - **#201** — internal identifiers removed from the public tree. ### Release prep - Root version boon.37 → boon.38; `pnpm release:prep` regenerated the lockstep set (211 files) → `[release-preflight] OK`. - `CHANGELOG.md` `## 2026.6.11-boon.38` section added; `scripts/package-changelog.mjs` extractor returns 2496 packaged bytes. ### After merge Tag `v2026.6.11-boon.38` → `boon-release.yml`. The fleet is pinned to `boon.36`, so the roll also picks up boon.37 (#189, #194–#198). Gateway roll first (gated `fleet-roll`), then the anychat-boon-web release that pins this tarball.
william-antoline-boon
added a commit
that referenced
this pull request
Sep 9, 2026
…211) ## Release 2026.6.11-boon.39 Surfaces a swallowed before_tool_call hook failure to Sentry + the durable audit trace so the ENG-19492 incident class is diagnosable after the fact. ### Contents (merged onto `boon` since boon.38) - **#209 (ENG-19492)** — emit a `before_tool_call_hook_failed` observability hook (genuine handler exception only, never a policy veto), paged by sentry-monitor, and thread the real error text into boon-core's audit_trace as an optional `detail` field. Requires boon-core companion getboon/boon#14629 (merged + live) which accepts the new field. Non-hook pipeline failures are classified separately. - **#208** — derive legacy tool counts from surfaced failures. ### Release prep - Root version boon.38 -> boon.39; lockstep regenerated (211 files: 135 plugin package.json + 70 npm-shrinkwrap.json + SDK/config baselines). All release-preflight --check steps pass. - CHANGELOG.md `## 2026.6.11-boon.39` section added. ### After merge Tag `v2026.6.11-boon.39` -> `boon-release.yml`. Fleet is pinned to boon.36, so a roll also picks up boon.37 (#194-#198) and boon.38 (#201, #202, #205). Claude-Session: https://claude.ai/code/session_01AMjtZJAWLVBwa5Dtc4oNog Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
convyusboy
added a commit
that referenced
this pull request
Sep 18, 2026
…onflicts) Merges 45 commits from origin/boon (boon.34 through boon.45, tag bump 06c4eff) into the 6.34 integration branch. 213 initial conflicts, ~206 were mechanical version-string conflicts (package.json / npm-shrinkwrap.json across root + bundled plugins, resolved to ours since this branch's purpose is advancing past the 2026.6.11-boon.N train). Non-trivial resolutions: - src/agents/embedded-agent-runner/run/failover-policy.ts: kept our side's non-exclusion of "model_not_found" in shouldEscalateRetryLimit (upstream openclaw#97571, already tested on this branch since the original 6.34 sync) while adopting boon's new "edge_blocked" exclusion. Blindly taking boon's side here would have silently reverted the upstream fix; caught via failover-policy.test.ts failing 1/44 before the correction. - src/config/sessions/session-accessor.ts: adopted boon's projectSessionEntryForPersistenceRevision call in createReplySessionInitializationRevision, replacing our own identity-field comparison workaround. Boon's own recent PR #205 reintroduced real use of this projection, so the workaround is no longer needed. - src/config/sessions/session-accessor.reply-init-concurrency.test.ts: kept our PID-suffixed temp-file naming in the child test script (avoids same-directory temp-path collisions across concurrent children); took boon's minor whitespace cleanup elsewhere. - extensions/matrix/CHANGELOG.md: kept our 3 newest entries on top, followed by boon's full chain. - scripts/plugin-sdk-surface-report.mjs: bumped publicExports budget 10406 -> 10410 and publicFunctionExports 5216 -> 5217 to match actual measured surface after the merge (publicEntrypoints already 324, unchanged). - docs/.generated/*.sha256: regenerated via `pnpm run plugin-sdk:api:gen` and `pnpm run config:docs:gen` against the merged tree. Also had to `git rm --cached` 6 underlying .json/.jsonl data files that origin/boon tracks but our .gitignore (unchanged by this merge) explicitly excludes (docs/.generated/*.json, docs/.generated/*.jsonl) -- git's merge machinery adds a file from either parent on a clean non-conflicting add regardless of the other side's gitignore rules. - pnpm-lock.yaml: merged clean with no conflict markers, but the auto-merge misplaced extensions/diagnostics-otel's @opentelemetry/* dependency block under the root "." importer instead of the extensions/diagnostics-otel importer. `pnpm install` (run as a side-effect of plugin-sdk:api:gen) correctly relocated it; confirmed root package.json has never declared these deps (neither current nor pre-merge HEAD) and extensions/diagnostics-otel/package.json declares exactly this set. Diff is a pure 33-line removal of the misplaced duplicate, kept. Verified: tsgo:core:test and tsgo:extensions:test clean; broad node scripts/run-vitest.mjs sweeps across all touched feature surfaces (embedded-agent-runner, config/sessions, cron, plugin-sdk, sentry-monitor, pdf-tool, media, subagents) all green. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related: ENG-19421
What Problem This Solves
Fixes two issues on Boon web chat when a turn delegates work to a sub-agent.
messagetool never sees that payload and theNO_REPLYrewrite produces a plain row instead.messageandsessions_yieldin the same assistant turn, themessagesend failed withOperation abortedand the channel showed a "couldn't complete one of the steps" row instead of the intended text.Why This Change Was Made
Adds an opt-in completion owner registry. A channel plugin registers one owner per channel through
PluginRuntime.subagent.registerCompletionOwner. When the announce flow has an owner for the requester channel and the owner accepts the route, the assembled completion event is handed to the owner instead of the legacy delivery. Every non-match (no owner, other channel, requester is a sub-agent,expectsCompletionMessagefalse,not_handled) falls through to the unchanged legacy path. A resumed announce record claimed by an owner that is no longer registered fails retryably instead of falling back, so a restart cannot produce a second visible row. AddsactiveRunPolicy: "wait"to the reply run options for owner-driven replies.Marks the
sessions_yieldtool as sequential. The agent loop already runs a batch in order when any tool in it is sequential, so tool calls emitted before the yield complete before the abort fires. Batches without a yield are unchanged. This differs from upstream, which keeps cancelling sibling tools on yield.Also carries two upstream fixes for
reply session initialization conflictedon resumed sub-agent turns (openclaw#97657, openclaw#98835), which the owner path depends on.User Impact
NO_REPLYtext.messagesend issued in the same turn assessions_yieldis delivered instead of failing.Evidence
packages/agent-core/src/agent-loop.test.ts: a parallel yield batch aborts the sibling send (reproduces the defect); a sequential yield lets the sibling send finish.sessions-yield-tool.test.tspinsexecutionMode: "sequential".oxfmt,oxlint,git diff --check,pnpm buildgreen.messagesends delivered while the sub-agent ran, no failed-step row.Live Slack and Teams checks were not run; those channels have no owner and use the unchanged path.
Local smoke run
Boon web chat on a local fork build with both changes (#205 and getboon/anychat-boon-web#124). Prompt: spawn a sub-agent that prints a random number every second for 60 seconds, then send
BOOYAH {last}with a joke; ask for the current number mid-run.messagesends in the same turn assessions_yield. No failed-step row.NO_REPLYtext.suggested_replies,audit_trace, and the completionturn_id; the callback returned 200.