Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 3:32 PM ET / 19:32 UTC. Summary PR surface: Source +83, Tests +244, Docs +1. Total +328 across 8 files. Reproducibility: yes. at source level: current main can return undefined for an empty terminal-failure run before final payload building. I did not run the live scenario locally, but the PR discussion includes Testbox and source-blind TUI PTY proof for the fixed path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this terminal-failure reply fix after exact-head checks complete, while leaving the broader successful-empty-completion behavior tracked by #99712. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main can return undefined for an empty terminal-failure run before final payload building. I did not run the live scenario locally, but the PR discussion includes Testbox and source-blind TUI PTY proof for the fixed path. Is this the best way to solve the issue? Yes for this terminal-error subcase: carrying a prepared fallback through the success-shaped result lets the reply owner drain deliveries, preserve bookkeeping, normalize/filter payloads, and avoid duplicate message-tool/source replies. The broader successful-empty-completion case remains separate. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f141408e7749. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +83, Tests +244, Docs +1. Total +328 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (5 earlier review cycles)
|
8e7e7d7 to
6d0e010
Compare
6d0e010 to
c7786f2
Compare
c7786f2 to
1ff92f7
Compare
|
Land-ready on exact head
|
1ff92f7 to
b526f4d
Compare
fb85fec to
e254f79
Compare
e254f79 to
22e3325
Compare
|
Merged via squash.
|
* fix: surface empty terminal run failures Co-authored-by: Moeed Ahmed <[email protected]> * docs: note terminal failure replies * fix: normalize terminal failure replies * fix: preserve terminal failure reply threading --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Moeed Ahmed <[email protected]>
…alCleanup flags Replaces the fork's two hardcoded Discord reaction patches (sticky-❌, inline-awaited cleanup) with opt-in config flags that default to upstream behavior, so upstream's statusReactions.timing tests pass unmodified and future rebases stop conflicting on them. - messages.statusReactions.stickyError: a failed run keeps its ❌ permanently (including on dispatch abort) instead of clearing after errorHoldMs, so unattended/overnight failures stay visible. - messages.statusReactions.awaitTerminalCleanup: the terminal-reaction hold/cleanup is awaited inline instead of fire-and-forget, so the gateway restart drain (waitForRestartReplyDrain) finishes it and cannot strand a reaction. Holds the channel's serialized run slot for the hold duration. Both default false = exact upstream behavior. Schema (strict), types, schema help, and field labels updated; the abort test is restored to upstream's version and flag-on variants added alongside it. Also refreshes fork test assertions that went stale on the v2026.7.1-2 rebase: upstream's markAgentRunFailureReplyPayload (openclaw#99304) now sets payload.isError on non-silent terminal failures, and the openai transient login-failure copy gained the /login codex pairing hint. Co-Authored-By: Claude Fable 5 <[email protected]>
What Problem This Solves
An embedded agent can reach a terminal failure while returning no visible payload. The reply operation records the failure, but the normal chat path previously had nothing to send, so an interactive request could appear to be ignored.
Why This Change Was Made
The contributor patch correctly identified the missing presentation, but its early
kind: "final"returns bypassed pending tool/block drains, reply normalization, dedupe, session bookkeeping, and usage/model metadata.This rewrite carries a prepared terminal-failure payload through the existing success-shaped run result. The outer reply owner waits for pending delivery, evaluates the canonical side-effect and source-delivery evidence, then appends the failure only when nothing was already delivered. Existing visible errors, message-tool/source replies, block streams, cron/approval side effects, non-direct silent policy, and heartbeat-specific copy remain authoritative.
User Impact
Interactive terminal run failures now produce one safe visible failure instead of silence. A reply already delivered through another supported path is not duplicated, and heartbeat failures retain heartbeat-specific guidance.
Release note context: Fix interactive requests appearing to be ignored when an agent run ends in a terminal failure without a visible payload.
Evidence
tbx_01kwsmzw7a12qk14aezg1w0wbron the final rebased head:runReplyAgentE2E tests passed.check:changedcore/coreTests/docs gate passed, including core/test typechecks, lint, import-cycle and repository guards.replyToMode: first, enabled display lanes share the slot, and message-tool dedupe sees the final routed target.tbx_01kwsnw1132ts7a0v3sg6sg3tmpassed all 5 clauses:No config, protocol, dependency, or storage surface changes.
Co-authored with and preserves credit for @moeedahmed's original report and patch direction.