Skip to content

fix: stop repeated notices after requester recovery fails - #179675

Merged
roboclaw-bot merged 2 commits into
mainfrom
fix/recovered-requester-notice-loop
Oct 22, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
fix/recovered-requester-notice-loop

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: a failed requester recovery can trigger another model turn solely to report that its subagent completion delivery failed, adding more attempts and error messages during a provider outage or rate limit.

User Impact

User impact: both batch settlement and ordinary completion announcements stop generating an extra model turn after recovery has permanently failed to produce a visible reply. Completed child work and the delivery failure remain available for inspection and explicit continuation.

This does not remove provider rate limits, change ordinary retry budgets, or automatically resume stopped sessions. No configuration change or migration is required.

Why This Change Was Made

The existing completion owner records the failure and retains the result. It now suppresses the additional blocked-delivery system event for permanent visible_reply_missing recovery failures. Ordinary announcements retain that structured failure through suspension, so the shared wake owner also refuses implicit replay after reopening the database. Separately admitted yield batches still proceed; other blocked-delivery notifications retain their existing behavior.

This removes a redundant recovery notification without adding a new state owner or retry mechanism. Against the base, the change adds 14 and removes 3 production lines, adds 121 and removes 13 test lines, and adds 5 documentation lines. The added tests protect the two distinct completion routes and durable recovery behavior.

Evidence

  • Batch-settlement regression: the production recovery resolver and completion settlement previously persisted an unwanted system event. After the fix, reopening the database shows no event, retained child completion, permanent failed-delivery state, and no requester wake.
  • Ordinary-announcement regression: the production completion/cleanup path previously called the requester wake once after the same recovery failure. After the fix, it retains the child result and structured failure with no event or implicit wake, including after database reopen. An explicitly admitted yield batch still wakes normally.
  • 315 focused tests pass across 8 files covering completion receipts, requester wake, mailbox, replay, delivery state, lifecycle, wake retries, and yielded settlement.
  • Production-core and agents-sessions test-shard typechecks, focused lint, formatting, and diff checks pass. The unchanged documentation previously passed its MDX check.
  • Independent AutoReview found no additional P0–P2 defects in the combined candidate. Its index-only finding was resolved by including the complete reviewed ordinary-announcement repair in the follow-up commit.
  • Exact-head CI passed for 20d70965b5cbf60bcbc0b745e9287fb942dd9df9; the repository watcher reports GREEN with no pending checks.
  • ClawSweeper revision 2 reviewed the exact current head, confirmed the ordinary-announcement finding is resolved, and found no code defects. It requested additional stored-data compatibility evidence.
  • Cross-version state proof: the real v2026.10.5 writer created pending, delivered, and failed completion rows in an isolated SQLite database. The current-head backed-up migration owner preserved all three results; its completion mutation suspended permanent missing-visible-reply recovery without queuing a notice. A fresh OS process reopened the database and confirmed the retained result, failure reason, and implicit-wake fence. No additional migration was needed on reopen. This uses the actual database/codec/mutation owners with synthetic run records, not a full Gateway/model E2E upgrade.
  • Proof is at the production recovery/settlement boundary; external announcement I/O is stubbed. No live provider rate-limit simulation or deployed-runtime validation is claimed.

Reported by and prepared with @VACInc.

Work sessions

Retain permanent missing-reply recovery failures and child results without queuing another model turn solely to report the failure.

Co-authored-by: VACInc <[email protected]>
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 21, 2026 16:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: XS labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Suppress redundant requester notices and implicit replay after recovery permanently finishes without a visible reply.

Example: Recovered requester run recovered-requester finishes without durable final delivery evidence.

  • Before: A successful child's blocked-delivery notice can start another requester model turn.
  • After: The child result and permanent delivery failure remain inspectable without an additional notice or ordinary wake.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and the earlier defect is resolved; harness coverage supports correctness, while existing-state upgrade validation remains outstanding.
Proof confidence 🦐 gold shrimp (3/6) Maintainer-authored ordinary proof exemption applies; supplied evidence exercises real recovery classification and SQLite settlement with announcement execution stubbed, but current-head database reopen does not establish latest-stable upgrade compatibility for the persisted delivery-reason extension.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A failed requester recovery can create additional model turns solely to report its failed completion delivery.
Reason: Avoiding redundant execution during recovery failures has clear user value, and the maintainer-authored direction preserves results and explicit continuation.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR addresses a current recovery defect, and the follow-up resolves the earlier ordinary-announcement finding without introducing a concrete code defect.

Priority: P2
Reviewed head: 20d70965b5cbf60bcbc0b745e9287fb942dd9df9

Before merge

  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Supply a v2026.10.5-to-head Gateway upgrade and restart showing existing child results and delivery state remain intact and terminal recovery does not create another notice or ordinary wake.
Agent review details

How this fits together

Subagent completion owners consume child results and requester delivery receipts, persist delivery state in SQLite, and schedule requester continuations or blocked-delivery notices.

flowchart TD
  A[Child completion] --> B[Announcement or batch settlement]
  B --> C[Recovery delivery receipt]
  C --> D[Shared completion mutation]
  D --> E[SQLite delivery state]
  E --> F[Requester wake guard]
  D --> G[Blocked notice queue]
Loading

Technical review

Best possible solution:

Retain terminal recovery failure in existing delivery state and suppress its redundant notice and ordinary wake through the existing completion owners.

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

Current-main source connects a permanent recovered-requester failure to unconditional blocked-notice insertion and ordinary wake handling; no target code was executed during this review.

Is this the best way to solve the issue?

The patch is a focused repair using the existing mutation, suspension, and wake owners, and its added regressions protect distinct failure paths without unnecessary machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4102af4aad69.

Provenance checked

  • Permanent-delivery suspension and replay fencing keeps the original intent (1ee4799: Prevent completed requesters from repeating tools after missing message-tool delivery while preserving retained results and genuine yield batches.)
  • Shared completion mutation and blocked notices changes intended behavior with a stated reason (6652f7e: Task runtime retirement retained native completion ownership; later authority-restoration repair ce9d859 excluded unrestorable-authority notices.)
  • Completion replay test organization keeps the original intent (37642c0: Consolidate repeated test setup while retaining boundary behavior; the modified fixture preserves existing cases and adds a distinct recovery failure.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit ce9d859 adds src/agents/subagents/completion/subagent-completion-mutation.kernel.ts:227 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ce9d859d68ab; files: src/agents/subagents/completion/subagent-completion-mutation.kernel.ts)
  • Luka Dolenc: Raw commit 1ee4799 adds src/agents/subagents/registry/subagent-delivery-state.ts:152 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1ee4799ba25c; files: src/agents/subagents/registry/subagent-delivery-state.ts)
  • RoboClaw: Raw commit db6caae adds src/agents/subagents/completion/subagent-completion-mutation.kernel.ts:224 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: db6caaea9aeb; files: src/agents/subagents/completion/subagent-completion-mutation.kernel.ts)

PR surface

Source +11, Tests +108, Docs +5. Total +124 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 14 3 +11
Tests 2 121 13 +108
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 140 16 +124

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +14/-3 lines; tests +121/-13 lines The modest production extension reuses existing owners; test growth covers two distinct completion routes and durable replay behavior.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status no longer selects a status label.

Label justifications:

  • P2: Redundant recovery turns add model attempts and misleading conversation output, with no demonstrated result loss or core outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide the latest-stable upgrade and restart scenario with retained completion data.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-21T17:26:26.972Z sha c01adb3 :: needs changes before merge. :: [P2] Carry recovery failure facts through ordinary completion blocking

Reviewed October 21, 2026, 4:55 PM ET / 20:55 UTC (Revision 2).

Retain permanent missing-reply recovery facts through completion suspension so the shared completion and wake owners suppress both notices and implicit replay. Preserve saved child results and separately admitted yield batches.

Co-authored-by: VACInc <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Addressed the ordinary-announcement path in 20d7096. Permanent missing-reply recovery is now retained through suspension and recognized by both the completion-notice and requester-wake owners. The new regression failed on the prior head with an unwanted wake and now passes, including database reopen and preservation of explicitly admitted yield batches. All 315 focused tests, targeted typechecks, lint, and formatting pass; the PR body is current.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@roboclaw-bot
roboclaw-bot merged commit 89992cd into main Oct 22, 2026
166 of 167 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/recovered-requester-notice-loop branch October 22, 2026 02:31
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…79675)

* fix: stop repeated notices after requester recovery fails

Retain permanent missing-reply recovery failures and child results without queuing another model turn solely to report the failure.

Co-authored-by: VACInc <[email protected]>

* fix: prevent recovery wake loops in ordinary announcements

Retain permanent missing-reply recovery facts through completion suspension so the shared completion and wake owners suppress both notices and implicit replay. Preserve saved child results and separately admitted yield batches.

Co-authored-by: VACInc <[email protected]>

---------

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

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant