Skip to content

fix: suppress false no-reply fallback during session continuation - #119154

Merged
obviyus merged 2 commits into
mainfrom
fix/subagent-yield-no-reply-noise
Aug 4, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/subagent-yield-no-reply-noise

Conversation

@obviyus

@obviyus obviyus commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #119152

What Problem This Solves

Fixes an issue where users waiting for a sessions_yield continuation could receive a false “No reply was generated” message before the final response arrived.

Why This Change Was Made

The reply pipeline now carries its existing yielded/pending-tool continuation fact into dispatch finalization. Empty-reply fallback delivery remains enabled for true terminal failures, but not while continuation work is pending.

User Impact

Users see the progress preview followed by the final response, without a misleading failure message in between.

Evidence

  • Regression test failed on main: expected no final reply, received the no-reply fallback. It passes with this change.
  • node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts — 442 passed.
  • Real Telegram userbot, same prompt and deterministic provider fixture:
    • Before: false fallback at 3.063s, then final response at 33.527s.
    • After: progress preview was cleaned up; only the final response remained at 33.473s.
  • OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 CI=1 pnpm check:changed — passed locally. Blacksmith Testbox was unavailable because this host lacks the Crabbox/Blacksmith client toolchain.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 4, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 4:22 AM ET / 08:22 UTC.

ClawSweeper review

What this changes

The PR prevents a yielded or pending-tool session continuation from receiving a false no-reply fallback before its final response arrives.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking code finding. The PR repairs the direct-dispatch gap by carrying the agent-result continuation fact to both fallback decisions; its protected maintainer label reserves the merge decision for explicit owner review.

Priority: P2
Reviewed head: d5ded05db4c31000386c44bc44aa2ff9ecea06fd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused owner-boundary repair with matching sibling behavior, targeted regression coverage, and concrete channel evidence.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body records a real Telegram userbot before-and-after run with the same deterministic fixture, including the premature fallback and final-response timings; redact any future attached trace details.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body records a real Telegram userbot before-and-after run with the same deterministic fixture, including the premature fallback and final-response timings; redact any future attached trace details.
Evidence reviewed 6 items Current-main defect: Current main suppresses the agent runner's empty-reply payload for yielded or pending-tool results, but direct dispatch finalization independently decides the core fallback without that continuation fact.
Fallback owner: The current finalizer emits the core fallback and channel-level eligibility based on terminal delivery state, leaving a source-proven path for an empty yielded handoff to be misclassified.
Authoritative continuation contract: The embedded runner marks yielded runs as paused, preserves pending tool calls, and emits a visible diagnostic when a yield has no continuation evidence, so genuine terminal failures remain visible.
Findings None None.
Security None None.

How this fits together

Auto-reply runs an agent, prepares reply payloads, and finalizes channel delivery. Finalization sends a no-reply fallback only when a directed turn is truly terminal and no visible response was delivered.

flowchart LR
  A[Inbound channel turn] --> B[Agent run]
  B --> C[Continuation classification]
  C --> D[Reply payload preparation]
  D --> E[Dispatch finalization]
  E --> F[Final reply or no-reply fallback]
Loading

Decision needed

Question Recommendation
Should this maintainer-tagged direct-dispatch repair be approved after exact-head checks complete? Approve the targeted repair: Retain the continuation relay because it preserves terminal fallbacks while suppressing only agent-classified pending continuations.

Why: The source and behavior evidence support the narrow fix, but the protected label requires an owner to make the final merge decision for this user-visible fallback behavior.

Before merge

None.

Agent review details

Security

None.

PR surface

Source +41, Tests +2. Total +43 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 6 46 5 +41
Tests 1 15 13 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 61 18 +43

Review metrics

Metric Value Why it matters
Production versus test delta production +19/-5; tests +42/-13 The net production growth carries one missing lifecycle fact through the existing owner boundary; the test growth covers both producer and fallback consumer behavior.

Mantis proof suggestion

A redacted Telegram Desktop recording would independently show that no fallback appears before the continuation response. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify a sessions_yield continuation emits no no-reply fallback before its final response.

Technical review

Best possible solution:

Keep continuation state authoritative at agent-result classification and land this direct-dispatch counterpart once the protected maintainer review and exact-head checks are complete.

Do we have a high-confidence way to reproduce the issue?

Yes: current main classifies yielded and pending-tool results as non-terminal in payload preparation, while direct finalization still emits its own fallback without that fact.

Is this the best way to solve the issue?

Yes: propagating the already-classified continuation fact is the narrowest maintainable repair; re-deriving it from filtered payloads or suppressing all empty replies would lose real failure reporting.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9faf34d3bcb6.

Labels

Label changes:

  • add P2: The linked bug creates a misleading but non-blocking channel message before the continuation completes.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body records a real Telegram userbot before-and-after run with the same deterministic fixture, including the premature fallback and final-response timings; redact any future attached trace details.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records a real Telegram userbot before-and-after run with the same deterministic fixture, including the premature fallback and final-response timings; redact any future attached trace details.
  • add mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The affected Telegram timeline is user-visible and can be directly confirmed in a short redacted desktop or live-transcript recording.

Label justifications:

  • P2: The linked bug creates a misleading but non-blocking channel message before the continuation completes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body records a real Telegram userbot before-and-after run with the same deterministic fixture, including the premature fallback and final-response timings; redact any future attached trace details.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body records a real Telegram userbot before-and-after run with the same deterministic fixture, including the premature fallback and final-response timings; redact any future attached trace details.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The affected Telegram timeline is user-visible and can be directly confirmed in a short redacted desktop or live-transcript recording.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Authored the recent directed-fallback and source-delivery eligibility hardening that this PR extends. (role: recent fallback-policy contributor; confidence: high; commits: 8eaa4d6d703e, 7c4291040c05; files: src/auto-reply/reply/dispatch-from-config.finalize.ts)
  • Peter Steinberger: Authored the lifecycle-state refactor that owns the dispatch-finalization boundary. (role: turn-lifecycle refactor author; confidence: high; commits: 408abcd46f9e; files: src/auto-reply/reply/dispatch-from-config.finalize.ts)
  • Sarah Fortune: Authored the existing deliberate-silence propagation pattern that the new continuation relay mirrors. (role: adjacent policy contributor; confidence: medium; commits: 138be7fd86d4; files: src/auto-reply/reply/agent-runner-result-payloads.ts, src/auto-reply/reply/dispatch-from-config.execute.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus
obviyus merged commit 1e38803 into main Aug 4, 2026
129 of 135 checks passed
@obviyus
obviyus deleted the fix/subagent-yield-no-reply-noise branch August 4, 2026 08:29
@obviyus

obviyus commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

Landed via squash onto main.

  • Scoped tests: node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts — 442 passed
  • Live proof: real Telegram userbot no longer received the false fallback before the final response
  • Changelog: not updated; focused bug fix
  • Land commit: d5ded05
  • Merge commit: 1e38803

vincentkoc added a commit that referenced this pull request Aug 4, 2026
…checkpoint

* origin/main: (46 commits)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  fix(auto-reply): suppress false no-reply fallback during continuations (#119154)
  fix(scripts): prevent gateway benchmarks from stalling on probes (#119063)
  test(channels): verify built sanitizer semantics (#119151)
  fix: prevent live updater from leaving Gateway offline indefinitely (#119116)
  test(qa): restore memory tools primary ownership (#119142)
  fix(agents): settle yielded fanout at harness boundary (#118703)
  fix(codex): cap compaction override warning cache via createDedupeCache (#101745)
  fix(daemon): skip unlabeled launchd plists (#119091)
  test(qa): repair QA catalog integrity (#119140)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main: (208 commits)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
  test(qa): cover Canvas agent and node controls (#119047)
  fix(cli): avoid repeated migration scans during local agent turns (#119051)
  fix(gateway): keep agents list on prepared model facts (#119208)
  fix(telegram): retry update offset persistence
  fix(ci): accept profiled partial Kova gates (#119121)
  fix(qqbot): keep channel API calls on the active account [AI] (#118575)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  fix(auto-reply): suppress false no-reply fallback during continuations (#119154)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
…time

* origin/main: (177 commits)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
  test(qa): cover Canvas agent and node controls (#119047)
  fix(cli): avoid repeated migration scans during local agent turns (#119051)
  fix(gateway): keep agents list on prepared model facts (#119208)
  fix(telegram): retry update offset persistence
  fix(ci): accept profiled partial Kova gates (#119121)
  fix(qqbot): keep channel API calls on the active account [AI] (#118575)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  fix(auto-reply): suppress false no-reply fallback during continuations (#119154)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
openclaw#119154)

* fix(auto-reply): keep pending continuations silent
* docs(auto-reply): clarify fallback ownership

---------

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

Labels

maintainer Maintainer-authored PR mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sessions_yield emits a false no-reply fallback before continuation

1 participant