Repository navigation
fix(agents): preserve follow-up errors and attachments - #170916
Conversation
Scope source-reply completion to each input while retaining historical delivery receipts. Use the same canonical completion state for terminal replies and remote attachment preparation.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccc300e4ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const completedSourceReplyViaMessageTool = | ||
| sourceReplyDeliveryState !== undefined | ||
| ? sourceReplyDeliveryState === "delivered" | ||
| : ordinarySourceReplies.completedSourceReplyViaMessageTool; | ||
| const deliveredSourceReplyViaMessageTool = | ||
| sourceReplyDeliveryState !== undefined | ||
| ? completedSourceReplyViaMessageTool | ||
| : ordinarySourceReplies.deliveredSourceReplyViaMessageTool; |
There was a problem hiding this comment.
Preserve custody for pending source replies
When sourceReplyDeliveryState is "pending"—for example, after a final message-tool send whose delivery observer failed or could not yet confirm settlement—this branch treats it exactly like "missing". That allows the builder to emit the assistant text, attachment, or terminal error alongside a send that may already have succeeded, even though observeReplyDelivery and resolveTerminalReplyDelivery explicitly retain custody for pending delivery to prevent duplicates. Treat pending as suppressing replacement artifacts while reserving "missing" for recovery.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed with negative production-owner tests: pending delivery (including an observation failure) could emit replacement text/media/error, and the admitted-host media path staged an attachment unnecessarily. The PR merged while cancellation was being reconciled, so the corrective follow-up is #170937. It keeps pending distinct from delivered and missing, preserves committed mirrors, and passes 129 focused cases including later-input recovery.
|
Merged via squash auto-merge.
|
* fix(agents): preserve pending reply delivery custody Keep unresolved source delivery separate from missing delivery when selecting replacement answers, attachments, and errors. Preserve committed mirrors and recovery for later steered inputs with missing delivery. Corrects the pending-custody case from #170916. * fix(agents): propagate observed delivery custody through terminal preparation
Scope source-reply completion to each input while retaining historical delivery receipts. Use the same canonical completion state for terminal replies and remote attachment preparation.
* fix(agents): preserve pending reply delivery custody Keep unresolved source delivery separate from missing delivery when selecting replacement answers, attachments, and errors. Preserve committed mirrors and recovery for later steered inputs with missing delivery. Corrects the pending-custody case from openclaw#170916. * fix(agents): propagate observed delivery custody through terminal preparation
What Problem This Solves
Fixes missing error replies and unprepared remote attachments when a new input steers an agent after an earlier input received a final reply through the message tool.
User Impact
Each accepted input keeps its own answer or failure outcome. A final reply for an earlier input no longer suppresses the later input's error reply or attachment preparation. Already delivered replies still avoid duplicate output; no configuration or migration is needed.
Why This Change Was Made
Delivery receipts accumulate across an attempt, but completion belongs to an individual input. The subscriber now retains canonical completion on each sealed answer segment, and both terminal payload selection and host attachment preparation use that state. Historical receipts remain available for transcript mirrors and deduplication.
Evidence
These are deterministic production-boundary regressions with synthetic provider output and remote-file bytes. They do not claim fresh live-provider or signed-in browser proof. Lifecycle error events were not suppressed by the original defect; the error regression concerns the reply payload.