Repository navigation
fix(telegram): recover directed turns after empty model replies - #118305
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 10:19 PM ET / August 3, 2026, 02:19 UTC. ClawSweeper reviewWhat this changesThe PR retries bare-empty and reasoning-only embedded-agent completions for visible turns, then makes the Telegram plugin send one generic recovery message only when the shared reply dispatcher has established that no visible reply was delivered. Merge readiness⛔ Blocked until stronger real behavior proof is added - 4 items remain The patch follows the shared settled-delivery eligibility contract rather than re-inferring silence in Telegram, and its focused tests cover retry and fallback delivery. It remains a maintainer-owned P1 merge decision: a current real Telegram scenario did not reach an assertion, and CI is still running on the latest head. Priority: P1 Review scores
Verification
How this fits togetherThe embedded agent runner turns a model completion into terminal reply state, and the shared reply dispatcher records whether a user-visible delivery occurred. The Telegram plugin consumes that settled result to decide whether it should emit a final recovery message to a directed group turn. flowchart LR
A[Directed Telegram message] --> B[Telegram dispatch turn]
B --> C[Embedded agent runner]
C --> D[Shared reply dispatcher]
D --> E{Visible reply delivered?}
E -->|Yes or explicit silence| F[No recovery message]
E -->|No, eligible| G[Telegram recovery reply]
G --> H[Telegram group user]
Decision needed
Why: The code and focused tests support the owner boundary, but no live Telegram run reached its assertion, so accepting that delivery risk is a maintainer release judgment. Before merge
Agent review detailsSecurityNone. PR surfaceSource -22, Tests +71. Total +49 across 6 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Mantis proof suggestionA Telegram Desktop proof can directly show that an eligible directed empty completion produces one recovery message while explicit NO_REPLY remains silent. A maintainer can ask Mantis to capture proof by posting this exact PR comment: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the shared eligibility consumer only after exact-head CI is green and a maintainer either supplies one real Telegram before/after transcript or explicitly records acceptance of the currently unproven live-delivery risk. Do we have a high-confidence way to reproduce the issue? No live reproduction was completed: the supplied Telegram proof runs failed before the scenario assertion. Yes at source level: the current branch’s focused tests model the settled eligibility path and the visible-turn retry boundary. Is this the best way to solve the issue? Yes: using the shared settled delivery fact is safer than Telegram re-inferring silence from empty payloads, because the producer already excludes observed delivery, message-tool delivery, deliberate silence, and double-send states. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 347f16d5565d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
I am retaining the changelog entry. Root |
|
@openclaw-mantis telegram desktop proof: verify that a directed group turn with an eligible empty completion produces exactly one recovery reply while explicit NO_REPLY remains silent. |
|
Maintainer decision: proceed without real Telegram proof. The missing proof is explicitly accepted for this landing. The residual risk is understood: two Desktop proof attempts skipped both baseline and candidate before any Telegram assertion because the isolated SUT could not start, and the separate Telegram live workflow also failed before its scenario ran. Exact-head CI, focused regression tests, live DeepSeek transport probes, and autoreview are green; no proof attempt observed a product failure. This comment is the explicit resolution of the remaining ClawSweeper proof/risk move for this merge. |
b04e3f3 to
7099215
Compare
04829f7 to
7550082
Compare
|
Merged via squash.
|
…claw#118305) * fix(telegram): recover empty directed replies * test: fix empty-reply assertions * test: restore result assertions --------- Co-authored-by: Peter Steinberger <[email protected]>
Closes #116277
What Problem This Solves
Fixes an issue where users sending directed Telegram group messages could receive no response when a model completed with no visible content, while the Telegram last-mile recovery also discarded its own fallback as intentional silence.
Why This Change Was Made
Visible turns now treat bare empty and reasoning-only model completions as incomplete and use the existing bounded continuation path; only explicit
NO_REPLYor genuinely reply-optional jobs remain silent. Telegram also consumes the shared settlednoVisibleReplyFallbackEligiblefact instead of re-inferring failure from zero payloads, preserving ambient group silence, room events, send-policy denial, message-tool delivery, and observed delivery.The issue's original DeepSeek attribution was retracted by the reporter after the affected interactive session was identified as Kimi. No provider-specific workaround is included.
User Impact
Directed Telegram group turns recover with a real answer when a bounded retry succeeds, or send one generic recovery message when the shared terminal classifier proves the turn is eligible. Explicit silence remains silent.
Evidence
node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run.incomplete-turn.test.ts -- -t "retries .* even when deliberate silence is allowed"— 2 passed, 155 skipped.node scripts/run-vitest.mjs extensions/telegram/src/bot-message-dispatch.fallback-topic-media.test.ts— 12 passed.deepseek-v4-flashstreaming probe, 3/3 HTTP 200 completions with visible content,finishReason=stop, and[DONE]; first visible content in 625–950 ms.b04e3f33ecdf.Real Telegram proof remains blocked by the proof infrastructure before any scenario assertion:
telegram-empty-response-after-write-recoveryran or produced an evidence manifest.No proof run observed a product failure; none reached the Telegram assertion. The PR remains open because ClawSweeper requires real after-fix Telegram evidence before merge.