Skip to content

fix(auto-reply): stop mislabeling sanctioned silent NO_REPLY finals as delivery failures (ENG-18092) - #131

Merged
convyusboy merged 2 commits into
boonfrom
ridho/eng-18092-openclawanychat-boon-web-skippedsuppressedaborted-turns
Aug 18, 2026
Merged

convyusboy merged 2 commits into
boonfrom
ridho/eng-18092-openclawanychat-boon-web-skippedsuppressedaborted-turns

Conversation

@convyusboy

@convyusboy convyusboy commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

ENG-18092 investigated silent/aborted turns in openclaw never posting a callback. Two of the ticket's three asks turned out to already be resolved elsewhere (see the linked comment on the issue for detail); chasing the third surfaced a more impactful, previously-unknown bug in the same code path.

Primary bug: src/auto-reply/reply/dispatch-from-config.ts's per-reply loop didn't special-case a legitimate silent NO_REPLY final — the system-prompt-mandated pattern (system-prompt.ts:557) the model uses after delivering visible output via the message tool, specifically to avoid duplicating the reply. The loop unconditionally treated this reply as an attempted delivery, and since the real dispatcher correctly refuses to send a silent-token payload, it got marked dispatchReplyOperation.fail("delivery_failed", ...) — a turn that had just delivered real content was recorded as failed.

Downstream impact: progress-nudge-runner.ts treats delivery_failed as a genuine failure. Combined with agents.defaults.progressNudge.enabled: true being live fleet-wide, any tool-heavy turn running past the 45s threshold (e.g. a takeoff analysis on a large upload) got a spurious, contradictory "The run hit an error before it could finish..." message immediately after successfully delivering its answer.

Secondary gap: a busy/aborted admission skip (the turn never reached the agent at all) was indistinguishable, in the returned result, from an intentional silent turn (the agent ran and produced nothing) — across 5 separate code paths in the same file, one of which (an entry-level abort check) had zero logging or bookkeeping of any kind.

Why This Change Was Made

  • The mislabeled delivery_failed bug produces a real, contradictory user-facing message on any channel with progressNudge enabled (confirmed live on the Boon fleet since 2026-07-24) — it undermines trust in a turn that actually succeeded.
  • Traced messages.queue.mode: "collect" (the Boon fleet's queue setting) end-to-end and confirmed the busy-skip path is not a rare corner case: the admission gate runs before collect's queue-mode logic is consulted, so a concurrent message normally waits (bounded by stuck-session recovery) and busy-drops on exhaustion — a plausible, concrete mechanism for the ticket's original "3 stalls, zero output" symptom.
  • A follow-up, lower-priority, higher-blast-radius gap (widening message-tool delivery detection beyond message_tool_only) was deliberately deferred to ENG-18262 rather than bundled here.

User Impact

  • Turns that deliver real content via the message tool and correctly close with NO_REPLY no longer get a spurious "run hit an error" progress-nudge message.
  • A busy/aborted admission skip now carries a turnSkipped: "active-run" | "aborted" | "duplicate" reason on the dispatch result (new optional field, additive), and is always logged (auto-reply/reply-admission subsystem, info level) instead of being --verbose-only or, in one case, completely silent.
  • No config/default changes; no behavior change for any turn that wasn't hitting one of these two bugs.

Evidence

🤖 Generated with Claude Code


Summary by cubic

Stops marking intentionally silent NO_REPLY finals as delivery failures and records why a turn was skipped before the agent ran (ENG-18092). Previously, a NO_REPLY final after a message-tool delivery was treated as delivery_failed, triggering a spurious progress‑nudge error; now these finals complete, while genuine undelivered media still fail.

Reviewer notes

  • Detects intentionally silent finals by reusing the dispatcher’s normalizeReplyPayload, including mixed forms like "**NO_REPLY"; only silent tokens that also include media still set delivery_failed.
  • Adds optional turnSkipped: "active-run" | "aborted" | "duplicate" to DispatchFromConfigResult and emits always-on info logs in auto-reply/reply-admission; covers heartbeat fast-path, pre‑dispatch/dispatch admission, plugin-owned-binding pre‑dispatch abort, and dedupe/duplicate skip.
  • Extends tests for silent-token and media carve‑out cases and removes ticket refs from comments/tests; no config/default changes and no migrations.

Written for commit 4e4ecba. Summary will update on new commits.

Review in cubic

…s delivery failures (ENG-18092)

A NO_REPLY-only final (the system-prompt-mandated pattern after a message-tool
delivery) was being marked as a delivery failure, which combined with
fleet-wide progressNudge produced a spurious 'run hit an error' notice on
turns that actually succeeded. Also adds a turnSkipped reason field so a
turn that never reached the agent (busy/aborted/duplicate admission skip)
is distinguishable from one that ran and produced nothing, with always-on
logging that previously didn't exist for several of these paths.
@claude

claude Bot commented Aug 18, 2026

Copy link
Copy Markdown

Claude Code is working…

I'll analyze this and get back to you.

View job run

@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.

All reported issues were addressed across 4 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

… ticket refs from comments/tests

Address cubic review on ENG-18092's PR: the plugin-owned-binding pre-dispatch
abort and the dedupe/duplicate skip both set turnSkipped but never emitted
the admission log added alongside them. Also removes Linear ticket ID
references from test titles and inline comments per repo convention.

@gandalfboon gandalfboon 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.

Approved — clean, well-scoped fix for the mislabeled delivery_failed on sanctioned silent NO_REPLY finals (ENG-18092).

Strong points:

  • isIntentionallySilentFinalReply reuses the dispatcher's own normalizeReplyPayload silent-skip detection instead of a parallel narrower check — the right call, it can't drift from what the dispatcher actually refuses.
  • Keys strictly on skipReason === "silent", so empty/heartbeat correctly stay out of the exemption.
  • Media carve-out is preserved and locked by a test: a NO_REPLY final carrying undelivered media still flags delivery_failed.
  • attemptedFinalDelivery = attemptedFinalDelivery || !intentionallySilent preserves prior truth and only spares the genuinely-silent reply — correct.
  • turnSkipped is additive/optional and the always-on admission logging closes the real gap where a busy/aborted skip was indistinguishable from an agent that produced nothing (one path had zero bookkeeping).

No config/default/migration changes, no secrets in history, tests cover the two nastiest edges (mixed-content **NO_REPLY + media-bearing token). Deferral of the wider message-tool detection to ENG-18262 is reasonable. Ship it.

@convyusboy
convyusboy merged commit b453783 into boon Aug 18, 2026
151 of 155 checks passed
@convyusboy
convyusboy deleted the ridho/eng-18092-openclawanychat-boon-web-skippedsuppressedaborted-turns branch August 18, 2026 09:30
Willi8910 added a commit that referenced this pull request Aug 20, 2026
Version-bump-only release cutting the seven commits merged to boon since
v2026.6.11-boon.19: #129 (deliver an attachment when prose is fused onto the
MEDIA: path), #131 (stop mislabeling sanctioned silent NO_REPLY finals as
delivery failures, ENG-18092), #133 (fingerprint sentry-monitor hook captures
and surface the real Python exception line), #130 (docs cross-link), and the
#36 / #77 / #113 dependency bumps.

Bumps the gateway plus @openclaw/slack, @openclaw/msteams, and
@openclaw/diagnostics-prometheus to 2026.6.11-boon.20 in lockstep across all 8
manifests, and adds the CHANGELOG entry. No code changes.

Co-authored-by: Claude Opus 5 (1M context) <[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.

1 participant