Skip to content

Surface empty interactive reply completions - #99716

Closed
grox2012 wants to merge 1 commit into
openclaw:mainfrom
grox2012:fix-empty-interactive-reply
Closed

grox2012 wants to merge 1 commit into
openclaw:mainfrom
grox2012:fix-empty-interactive-reply

Conversation

@grox2012

@grox2012 grox2012 commented Jul 4, 2026

Copy link
Copy Markdown

Summary

  • Surface a user-visible error payload when an interactive runReplyAgent turn completes with no visible reply payload.
  • Preserve intentional silence for heartbeat, silentExpected, allowEmptyAssistantReplyAsSilent, message_tool_only, and runs that already delivered a successful side effect.
  • Add e2e coverage for the ordinary empty interactive completion and the message_tool_only empty-completion exception.

Fixes #99712

Tests

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts
  • corepack pnpm exec oxlint src/auto-reply/reply/agent-runner.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts

@openclaw-barnacle openclaw-barnacle Bot added size: S triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 4, 2026
@clawsweeper

clawsweeper Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 8:09 PM ET / 00:09 UTC.

Summary
Adds an empty-interactive-reply error payload guard in runReplyAgent and e2e coverage for ordinary empty completions plus message_tool_only silence.

PR surface: Source +54, Tests +34. Total +88 across 2 files.

Reproducibility: yes. at source level: current main and v2026.6.11 can return undefined for an empty completed run after only the narrow fallback-backend helper. OpenClaw's Codex projector also preserves completed empty turns with no prompt error, though I did not run a live Telegram reproduction in this read-only review.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #99712
Summary: This PR is the candidate fix for the open linked issue about interactive empty completions silently dropping replies.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add redacted after-fix evidence from a real Telegram/direct-channel or equivalent interactive run showing the visible fallback delivery.
  • Keep private information such as API keys, phone numbers, IP addresses, and non-public endpoints out of the proof artifact.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The external PR lists tests only, so the contributor should add redacted after-fix screenshot/recording, terminal output, live output, or logs showing real fallback delivery; updating the PR body should trigger re-review, or a maintainer can ask @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A native Telegram proof would directly show that an empty completion now produces visible fallback text instead of a silent turn. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify an interactive Telegram direct turn with an empty completion sends the visible fallback text and preserves intentional silent policies.

Risk before merge

  • [P2] External after-fix proof is absent; mocked e2e tests do not show the fallback delivered in a real Telegram or direct-channel setup.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the runner-level guard and tests, then merge only after redacted real behavior proof demonstrates visible fallback delivery for an interactive automatic-delivery turn and CI is green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The remaining blocker is contributor-supplied real behavior proof and normal maintainer merge review, not a concrete code repair for ClawSweeper to apply.

Security
Cleared: The diff adds a reply fallback and tests only; it does not change secrets, dependencies, CI, package resolution, or code execution boundaries.

Review details

Best possible solution:

Keep the runner-level guard and tests, then merge only after redacted real behavior proof demonstrates visible fallback delivery for an interactive automatic-delivery turn and CI is green.

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

Yes at source level: current main and v2026.6.11 can return undefined for an empty completed run after only the narrow fallback-backend helper. OpenClaw's Codex projector also preserves completed empty turns with no prompt error, though I did not run a live Telegram reproduction in this read-only review.

Is this the best way to solve the issue?

Yes: the runner final-payload path is the right fix boundary because it already owns payload filtering, silent policy, source delivery evidence, and queue drain. A Telegram-only or Codex-only fix would be one-sided, but the PR still needs real behavior proof before merge.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 52323b67c587.

Label changes

Label changes:

  • add P1: The linked bug affects accepted interactive channel turns that can complete without any visible reply, making real user workflows appear hung.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The external PR lists tests only, so the contributor should add redacted after-fix screenshot/recording, terminal output, live output, or logs showing real fallback delivery; updating the PR body should trigger re-review, or a maintainer can ask @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • add mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The linked symptom is visible Telegram direct-message behavior, and a short Telegram Desktop proof can show fallback text replacing silence.

Label justifications:

  • P1: The linked bug affects accepted interactive channel turns that can complete without any visible reply, making real user workflows appear hung.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The external PR lists tests only, so the contributor should add redacted after-fix screenshot/recording, terminal output, live output, or logs showing real fallback delivery; updating the PR body should trigger re-review, or a maintainer can ask @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The linked symptom is visible Telegram direct-message behavior, and a short Telegram Desktop proof can show fallback text replacing silence.
Evidence reviewed

PR surface:

Source +54, Tests +34. Total +88 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 54 0 +54
Tests 1 34 0 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 88 0 +88

What I checked:

Likely related people:

  • 100yenadmin: Authored merged work that touched Codex output preservation and the same agent-runner output surface shortly before this PR. (role: recent Codex/reply recovery contributor; confidence: medium; commits: 414ecd2b9689; files: extensions/codex/src/app-server/event-projector.ts, src/auto-reply/reply/agent-runner.ts)
  • steipete: Authored the structured terminal classifier/fallback refactor that is adjacent to empty, reasoning-only, and planning-only terminal outcomes. (role: terminal outcome refactor author; confidence: high; commits: 0314819f918a; files: extensions/codex/src/app-server/event-projector.ts, src/auto-reply/reply/agent-runner.ts, src/agents/model-fallback.ts)
  • fuller-stack-dev: Authored earlier empty post-tool final recovery work and merged the recent Codex output preservation PR touching this surface. (role: empty outcome recovery contributor and recent merger; confidence: high; commits: 77a682c5def2, 414ecd2b9689; files: extensions/codex/src/app-server/event-projector.ts, src/agents/embedded-agent-runner/run.ts, src/auto-reply/reply/agent-runner.ts)
  • sandieman2: Authored the queued-followup/final-reply delivery fix in the same reply delivery and queue-drain area. (role: reply delivery contributor; confidence: medium; commits: c67dc59b02b0; files: src/auto-reply/reply/agent-runner.ts, src/auto-reply/reply/followup-delivery.ts, src/auto-reply/reply/queue/drain.ts)
  • vincentkoc: Recently worked on preserving CLI/message delivery evidence used by the runner to decide whether a visible fallback is needed. (role: message delivery evidence contributor; confidence: medium; commits: 0ea08076c3b5; files: src/auto-reply/reply/agent-runner.ts, src/agents/embedded-agent-message-tool-source-reply.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P1 High-priority user-facing bug, regression, or broken workflow. labels Jul 4, 2026
@openclaw-mantis

Copy link
Copy Markdown
Contributor

Mantis Telegram Desktop Proof

Summary: Mantis captured Telegram Desktop before/after GIFs; the PR still showed no bot reply after an empty interactive turn.

Main screenshot This PR screenshot
Baseline native Telegram Desktop screenshot Candidate native Telegram Desktop screenshot
Main This PR
Baseline native Telegram Desktop proof GIF Candidate native Telegram Desktop proof GIF

Motion-trimmed clips:

Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-desktop/pr-99716/run-28688852394-1/index.json

@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Superseded by #100456, which landed as f0093b7020e772c0ac3237b25b149d369c604915 and fixes #99712 across both direct interactive turns and queued follow-ups. The landed implementation also preserves explicit silence, pending continuations, and committed side effects, with focused Testbox and live Gateway/TUI PTY proof.

Thank you @grox2012 for working on this failure mode.

@steipete steipete closed this Jul 5, 2026

This branch had an error being deployed

1 failed deployment
qa-live-shared — d3be3b33 Deployed Jul 4, 2026 by clawsweeper[bot] via Run agentic native Telegram proof #272482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactive direct turns can complete with empty output and silently drop the reply

2 participants