Skip to content

fix(auto-reply): reasoning progress never streams when a channel delivers via the message tool (ENG-19103) - #306

Merged
convyusboy merged 2 commits into
boonfrom
ridho/eng-19103-thinking-lane-message-tool-only
Oct 23, 2026
Merged

convyusboy merged 2 commits into
boonfrom
ridho/eng-19103-thinking-lane-message-tool-only

Conversation

@convyusboy

@convyusboy convyusboy commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #ENG-19103 (Linear): https://linear.app/getboon/issue/ENG-19103/boon-web-thinking-lane-never-fires-despite-thinkingenabledtrue-no

What Problem This Solves

Fixes an issue where a channel plugin that delivers replies through the
message tool (instead of automatic source delivery) would never receive
streamed reasoning/thinking progress callbacks, even when it correctly
declared allowProgressCallbacksWhenSourceDeliverySuppressed: true to ask
for exactly that. Concretely: anychat-boon-web's "thinking lane" — the
ephemeral "agent is working" indicator meant to stream reasoning content to
the Boon Web chat widget — never streamed any reasoning text, regardless of
thinking.enabled: true and otherwise-correct configuration. The same gap
silently broke Slack's reasoning-stream UI under its own
message_tool_only room-event delivery path.

Why This Change Was Made

dispatchReplyFromConfig wraps every GetReplyOptions progress callback
in wrapProgressCallback, which forwards it under suppressed source
delivery only when the callback's own wrapping passes
forwardWhenSourceDeliverySuppressed: true. onToolStart, onItemEvent,
onCommandOutput, and onPatchSummary already had this escape hatch;
onReasoningStream/onReasoningEnd did not — they were wrapped with no
options object at all, so they were unconditionally dropped under
message_tool_only no matter what flags a channel set. This directly
contradicted the documented contract of
allowProgressCallbacksWhenSourceDeliverySuppressed ("Allow channel-owned
progress UI while final/source reply delivery remains message-tool-only").

The fix gives onReasoningStream/onReasoningEnd the same escape hatch,
matching the existing pattern exactly — no new config or flag surface.
Deliberately out of scope: onPartialReply/onAssistantMessageStart/
onBlockReplyQueued are left with the same unescaped wrapping (unrelated
to this lane, and extending it risks changing Discord/Slack/Telegram's
shipped streaming-draft UX); followup-runner.ts's separate, structurally
different gap (it never reads suppressDefaultToolProgressMessages at
all) is a different turn path, untouched here. Also out of scope: Boon Web
still never requests reasoningLevel: "stream", so this alone won't yet
populate content in its thinking payload — a separate, larger product
decision (its own config surface) that the plugin's own callback contract
already treats as a valid state (content: "").

User Impact

Channels that use message_tool_only delivery and ask for channel-owned
progress UI (today: Boon Web, Slack room events) now actually receive
reasoning-stream callbacks instead of silently losing them. No impact for
channels that don't set allowProgressCallbacksWhenSourceDeliverySuppressed.

Evidence

Not yet live-verified (that requires an anychat-boon-web release/rollout
and a replayed thinking-enabled thread — out of scope for this PR to run).

  • New regression test in src/auto-reply/reply/dispatch-from-config.test.ts
    (extended the existing "forwards channel-owned group progress callbacks
    while source delivery is suppressed" test) proves the bug and the fix:
    fails before the fix (onReasoningStream/onReasoningEnd never called),
    passes after.
  • node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.test.ts
    → 218/218 passed.
  • node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/followup-runner.test.ts
    → 323/323 passed.
  • agent-runner.runreplyagent.e2e.test.ts has 2 pre-existing, unrelated
    failures (stale compaction-fallback message-wording assertions — the
    asserted string doesn't exist in current production code) confirmed
    present without this change (verified via git stash) — not introduced
    by this PR.
  • oxfmt --check and oxlint clean on both changed files.
  • Independent review: Codex CLI auth was unavailable in this environment,
    so two independent subagent reviews (correctness-focused and
    conventions/best-fix-focused) were run instead. Both returned zero
    findings at ≥80 confidence; both independently corroborated the root
    cause via Slack's existing onReasoningStream +
    allowProgressCallbacksWhenSourceDeliverySuppressed wiring.

🤖 Generated with Claude Code


Summary by cubic

Fixes reasoning-stream callbacks being silently dropped under message_tool_only delivery, so channels using that mode now actually receive thinking-lane progress when they opt into channel-owned progress UI.

onReasoningStream/onReasoningEnd were wrapped without the forwardWhenSourceDeliverySuppressed escape hatch that the tool-lifecycle callbacks already had, so dispatchReplyFromConfig unconditionally discarded them despite allowProgressCallbacksWhenSourceDeliverySuppressed. The fix matches the existing pattern exactly; no new config surface.

  • Fixes anychat-boon-web's thinking lane (never streamed reasoning despite thinking.enabled: true) and Slack's reasoning stream.
  • Deliberately out of scope: onPartialReply and related callbacks keep their existing wrapping, followup-runner.ts's separate gap is untouched, and channels that don't set allowProgressCallbacksWhenSourceDeliverySuppressed see no change.

Written for commit c99212d. Summary will update on new commits.

View guided diff Turn on auto-fix

…only (ENG-19103)

onReasoningStream/onReasoningEnd were wrapped with no options object in
dispatchReplyFromConfig's progress-callback gate, so they had no way to
pass the suppressed-source escape hatch that onToolStart/onItemEvent/
onCommandOutput/onPatchSummary already have. Under
sourceReplyDeliveryMode: "message_tool_only" they were silently and
unconditionally dropped, regardless of
allowProgressCallbacksWhenSourceDeliverySuppressed — contradicting that
flag's own documented contract.

This is why anychat-boon-web's thinking lane never streamed reasoning
content despite thinking.enabled: true and correct wiring (its tool-step
lane was unaffected, since those four callbacks already had the escape
hatch). Not a regression: identical gap at the exact core version pinned
in the original field report. Also silently broke Slack's reasoning
stream under its own message_tool_only room-event path.

Fix: give onReasoningStream/onReasoningEnd the same
forwardWhenSourceDeliverySuppressed: true escape hatch, matching the
existing pattern exactly. No new config/flag surface.

Co-Authored-By: Claude Opus 5 <[email protected]>
@convyusboy
convyusboy requested a review from a team October 23, 2026 13:18

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic analysis

All reported issues were addressed across 2 files

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Linked issue analysis

Linked issue: ENG-19103: Boon Web thinking-lane never fires despite thinking.enabled=true (no ephemeral "agent is working" indicator)

Status Acceptance criteria Notes
✅ Forward reasoning callbacks when source delivery is suppressed dispatchReplyFromConfig opts both callbacks into the escape hatch, and the regression test verifies both arrive.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Per cubic review on PR #306: keep source comments ticket-free, invariant-only.

@boon-hermes-bot boon-hermes-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 80b665ec0a02168c27c61ff74d520b826cf1ed24 → c99212d15ac35c8f9f89cf5a44a1a5361dd7fef0.

No blocking code findings. onReasoningStream and onReasoningEnd now opt into the existing suppressed-source callback gate; forwarding still requires the channel's explicit allowProgressCallbacksWhenSourceDeliverySuppressed opt-in and remains disabled when sending is denied. The regression is covered by the exact-head checks-node-auto-reply-reply-dispatch job: dispatch-from-config.test.ts ran 218 tests, and the shard passed 26 files / 747 tests.

CI caveat: the exact-head CI run failed in security-fast because the production dependency audit reported one critical and one high DOMPurify advisory. This PR changes no dependency files, so that failure is unrelated to the diff. No live Boon Web release/replay was run; this is approval of the core callback change, not deployed UI behavior.

Both PR commits are GitHub-verified (valid). The active ruleset separately requires one approval from team ID 8602074; team identity/eligibility and classic branch-protection details are unavailable to this integration, so merge readiness remains unverified and this bot review should not be assumed to clear that team gate. No auto-merge or merge-queue entry was active at review time.

@convyusboy
convyusboy merged commit f64d442 into boon Oct 23, 2026
145 of 149 checks passed
@convyusboy
convyusboy deleted the ridho/eng-19103-thinking-lane-message-tool-only branch October 23, 2026 17:23
convyusboy added a commit that referenced this pull request Oct 26, 2026
* chore(release): bump version 2026.6.35-boon.1 -> 2026.6.35-boon.2

Cuts the fork release covering the 9 PRs merged to boon since v2026.6.35-boon.1:
#298 (ENG-21265) stuck-generation cut-off retry + sub-agent spawn backstop,
#299 workspaceDir threading through outbound channel media adapters,
#304 (ENG-19208) real inbound media path in the system prompt,
#301 (ENG-21585) forced sessions_yield on narrated sub-agent turns,
#305 message-tool source reply observed outside message_tool_only,
#306 (ENG-19103) reasoning-stream callbacks honor message_tool_only,
#303 sub-agent/completion-turn usage attribution,
#302 clears 7 high-severity pnpm-audit-prod advisories,
#300 (ENG-21588) boon-estimation trajectory label detail.

Bump root package.json/npm-shrinkwrap.json, all bundled plugin manifests, and
the version + openclaw peer floor in every extension npm-shrinkwrap.json. Add
the 2026.6.35-boon.2 CHANGELOG.md section. No additional dependency or source
changes beyond what already shipped in #299 and #302.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* docs(changelog): fold PR #309's advisory fixes into the 2026.6.35-boon.2 entry

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants