Skip to content

fix: check the original assignment after child runs settle - #208391

Merged
roboclaw-bot merged 6 commits into
mainfrom
openclaw/calm-langoustine-2f39dc
Nov 29, 2026
Merged

roboclaw-bot merged 6 commits into
mainfrom
openclaw/calm-langoustine-2f39dc

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

A parent can receive all child reviews and report them finished even when the assignment still calls for a repair. Optional reply delivery bypassed the built-in completion check on settlement turns.

User Impact

A parent producing a visible settlement report gets one opportunity to act on remaining work without another user message. Optional silence and already delivered replies remain unchanged.

Why This Change Was Made

Reuse the existing same-turn check on child batch settlement, independent of whether a reply is required. Shorten the settlement instruction and reminder. No new Goal or permission is required.

Evidence

All 17 terminal-loop tests passed locally. The scripted settlement case performs a remaining repair despite optional reply delivery and no saved plan. This is a runner-level test, not a live model evaluation.

CI caught a steering test fixture that returned “Correction applied” on every second model call, even when the model never received a correction. The fixture now answers from the actual model input. Both gateway cases passed locally (64 seconds): a browser correction reaches the browser-owned command, but not the system-owned command. Targeted lint, type checking and formatting passed.

Contributor: @VACInc

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 29, 2026 15:37
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: 0383c719-8848-84a9-948c-964f8def2c57
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Nov 29, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. labels Nov 29, 2026
roboclaw-bot and others added 3 commits November 29, 2026 15:42
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: cf1e1730-2ec0-8685-b378-ed27a8d3b829
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Extend the bounded completion check to optional child-settlement turns and shorten the continuation instructions.

Example: Child reviews find a deployment requiring approval and an independent repair that can proceed.

  • Before: The parent can report the blocker and stop without performing the independent repair.
  • After: The parent gets one same-turn opportunity to perform the remaining repair without another user message.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, useful patch with meaningful session-loop coverage and limited evidence about real-model behavior.
Proof confidence 🦐 gold shrimp (3/6) This PR is exempt from the contributor proof gate; its reported runner tests exercise settlement continuation with scripted provider output, while the steering tests cover correction custody rather than real-model completion behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: The parent can stop after child reviews arrive even though an independent, authorized repair remains.
Reason: The maintainer-authored direction repairs a concrete eligibility gap using an existing bounded mechanism.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a current completion-check gap through the existing owner, and no actionable introduced defect was found.

Reviewed head: 37e490b82d2ce9fbd4d66f8e441a9b3c580e9539

Before merge

None.

Findings

None.

Agent review details

How this fits together

Child-settlement messages enter the embedded runner, whose terminal-delivery owner either publishes the answer or queues one follow-up using the current transcript and results.

flowchart TD
  A[Child results] --> B[Requester settlement message]
  B --> C[Embedded session loop]
  C --> D[Terminal completion check]
  D --> E[Same-turn follow-up]
  E --> C
  D --> F[Reply delivery]
Loading

Technical review

Best possible solution:

Keep the one-shot settlement check in the existing terminal owner while preserving delivery, cancellation, and handoff guards.

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

Current main excludes optional settlement turns from completion checking, and the added session-loop case directly exercises that path; real-model premature stopping was not independently reproduced.

Is this the best way to solve the issue?

The eligibility change is a focused extension of the existing mechanism without replay or new state; model compliance with the shortened reminder remains less certain than the runner control flow.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Completion-check eligibility changes intended behavior with a stated reason (3ba0a0b: Give newly saved unfinished plans one same-prompt reconsideration while preserving terminal guards and completed effects.)
  • Completion reminder and blocker silence changes intended behavior with a stated reason (4af2bb9: Explicit silence guidance prevented repeated blocker reports from replacing the substantive answer; this PR deliberately shortens the reminder and retains an instruction against repeating status.)
  • Shared child-completion instruction keeps the original intent (b90cc02: Keep responsibility for the requested outcome with the parent after child runs finish, including fixable review findings.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit 3ba0a0b adds src/agents/embedded-agent-runner/run/attempt-stream-prepare.ts:142 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3ba0a0b23761; files: src/agents/embedded-agent-runner/run/attempt-stream-prepare.ts)
  • Ayaan Zaidi: Raw commit f2dff0d adds src/agents/embedded-agent-runner/run/attempt-stream-prepare.ts:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f2dff0dcf9cc; files: src/agents/embedded-agent-runner/run/attempt-stream-prepare.ts)
  • Jason (Json): Raw commit b90cc02 adds src/agents/subagents/completion/subagent-completion-instructions.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b90cc020cada; files: src/agents/subagents/completion/subagent-completion-instructions.ts)

PR surface

Source +4, Tests +33. Total +37 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 10 6 +4
Tests 3 45 12 +33
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 55 18 +37

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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-11-29T15:55:41.152Z sha 461f832 :: passed. :: none

Reviewed November 29, 2026, 11:02 AM ET / 16:02 UTC (Revision 2).

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Nov 29, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

obviyus added a commit that referenced this pull request Nov 29, 2026
#208469)

## What Problem This Solves

Since b1f5380 (#208391, "check the original assignment after child runs settle"), scheduled CI on main has been red in `checks-node-compact-large` and `checks-node-compact-small`. The same change also breaks child-result e2e scripts that the scheduled lanes do not run.

After a parent's final reply to a child result, the run publishes that reply. It then sends the model one hidden completion check: "Continue unfinished work from the current results. If nothing can advance, don't repeat the status." The scripted model servers in these tests count every request as a new delivery or script step, so each now sees one extra request:

| test | failure on main |
|---|---|
| `server.subagent-stop-followup.product` | delivered 2 instead of 1; continuations 2 instead of 1 (7 cases) |
| `server.subagent-live-requester-expiry.product` | completion calls 2 instead of 1; wait timeout (2 cases) |
| `chat-goal-created-authority.e2e` | Goal script off by one call |
| `subagent-requester-owner.e2e` | completion responses 2 instead of 1 (2 cases) |
| `chat-goal-created-yield.e2e` | Goal script off by one call |

`server.goal-child-authority.product` had the same cause. It is already fixed on main by #208478, so this PR keeps main's version.

## User Impact

No product change. These tests turn green again on main and keep proving:
- exactly one delivery for a retired source;
- one continuation per resolved cohort;
- a child kept behind a live requester;
- Goal authority across role loss;
- one completion per requester.

## Why This Change Was Made

The completion check is intended behavior of #208391; the test scripts were stale.
- A shared helper, `isCompletionCheckRequest`, recognizes a request whose newest input is the check.
- Each script answers that request with `NO_REPLY`, the way a model with nothing left to advance would. #208478 uses the same model answer.

Echoing the previous final was tried first. The Goal product test then recorded the requester's final twice, because the run publishes the first final before the check.

## Evidence

- Bisect for the scheduled red (run 46283967087): the product files pass at b1f5380~1 (15/15) and fail at b1f5380 (10 failed). Main at a2bb4a6 fails the same 10.
- PR CI found the two e2e scripts through the helper's importers; each failed the same way.
- With this branch on current main: all 6 files pass locally (20/20 tests, including main's goal-child version).

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
#208469)

Since b1f5380 (#208391, "check the original assignment after child runs settle"), scheduled CI on main has been red in `checks-node-compact-large` and `checks-node-compact-small`. The same change also breaks child-result e2e scripts that the scheduled lanes do not run.

After a parent's final reply to a child result, the run publishes that reply. It then sends the model one hidden completion check: "Continue unfinished work from the current results. If nothing can advance, don't repeat the status." The scripted model servers in these tests count every request as a new delivery or script step, so each now sees one extra request:

| test | failure on main |
|---|---|
| `server.subagent-stop-followup.product` | delivered 2 instead of 1; continuations 2 instead of 1 (7 cases) |
| `server.subagent-live-requester-expiry.product` | completion calls 2 instead of 1; wait timeout (2 cases) |
| `chat-goal-created-authority.e2e` | Goal script off by one call |
| `subagent-requester-owner.e2e` | completion responses 2 instead of 1 (2 cases) |
| `chat-goal-created-yield.e2e` | Goal script off by one call |

`server.goal-child-authority.product` had the same cause. It is already fixed on main by #208478, so this PR keeps main's version.

No product change. These tests turn green again on main and keep proving:
- exactly one delivery for a retired source;
- one continuation per resolved cohort;
- a child kept behind a live requester;
- Goal authority across role loss;
- one completion per requester.

The completion check is intended behavior of #208391; the test scripts were stale.
- A shared helper, `isCompletionCheckRequest`, recognizes a request whose newest input is the check.
- Each script answers that request with `NO_REPLY`, the way a model with nothing left to advance would. #208478 uses the same model answer.

Echoing the previous final was tried first. The Goal product test then recorded the requester's final twice, because the run publishes the first final before the check.

- Bisect for the scheduled red (run 46283967087): the product files pass at b1f5380~1 (15/15) and fail at b1f5380 (10 failed). Main at a2bb4a6 fails the same 10.
- PR CI found the two e2e scripts through the helper's importers; each failed the same way.
- With this branch on current main: all 6 files pass locally (20/20 tests, including main's goal-child version).

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit f0ec484)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
#208469)

Since b1f5380 (#208391, "check the original assignment after child runs settle"), scheduled CI on main has been red in `checks-node-compact-large` and `checks-node-compact-small`. The same change also breaks child-result e2e scripts that the scheduled lanes do not run.

After a parent's final reply to a child result, the run publishes that reply. It then sends the model one hidden completion check: "Continue unfinished work from the current results. If nothing can advance, don't repeat the status." The scripted model servers in these tests count every request as a new delivery or script step, so each now sees one extra request:

| test | failure on main |
|---|---|
| `server.subagent-stop-followup.product` | delivered 2 instead of 1; continuations 2 instead of 1 (7 cases) |
| `server.subagent-live-requester-expiry.product` | completion calls 2 instead of 1; wait timeout (2 cases) |
| `chat-goal-created-authority.e2e` | Goal script off by one call |
| `subagent-requester-owner.e2e` | completion responses 2 instead of 1 (2 cases) |
| `chat-goal-created-yield.e2e` | Goal script off by one call |

`server.goal-child-authority.product` had the same cause. It is already fixed on main by #208478, so this PR keeps main's version.

No product change. These tests turn green again on main and keep proving:
- exactly one delivery for a retired source;
- one continuation per resolved cohort;
- a child kept behind a live requester;
- Goal authority across role loss;
- one completion per requester.

The completion check is intended behavior of #208391; the test scripts were stale.
- A shared helper, `isCompletionCheckRequest`, recognizes a request whose newest input is the check.
- Each script answers that request with `NO_REPLY`, the way a model with nothing left to advance would. #208478 uses the same model answer.

Echoing the previous final was tried first. The Goal product test then recorded the requester's final twice, because the run publishes the first final before the check.

- Bisect for the scheduled red (run 46283967087): the product files pass at b1f5380~1 (15/15) and fail at b1f5380 (10 failed). Main at a2bb4a6 fails the same 10.
- PR CI found the two e2e scripts through the helper's importers; each failed the same way.
- With this branch on current main: all 6 files pass locally (20/20 tests, including main's goal-child version).

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit f0ec484)

Follow-up audit: No later same-path, PR-number or SHA references through be407a4.

Release adaptation: Keep the stable authority fixture helpers and skip the upstream-only live-requester-expiry product test; tolerate an empty model input in the shared predicate.

Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
openclaw#208469)

## What Problem This Solves

Since 5c70bf5 (openclaw#208391, "check the original assignment after child runs settle"), scheduled CI on main has been red in `checks-node-compact-large` and `checks-node-compact-small`. The same change also breaks child-result e2e scripts that the scheduled lanes do not run.

After a parent's final reply to a child result, the run publishes that reply. It then sends the model one hidden completion check: "Continue unfinished work from the current results. If nothing can advance, don't repeat the status." The scripted model servers in these tests count every request as a new delivery or script step, so each now sees one extra request:

| test | failure on main |
|---|---|
| `server.subagent-stop-followup.product` | delivered 2 instead of 1; continuations 2 instead of 1 (7 cases) |
| `server.subagent-live-requester-expiry.product` | completion calls 2 instead of 1; wait timeout (2 cases) |
| `chat-goal-created-authority.e2e` | Goal script off by one call |
| `subagent-requester-owner.e2e` | completion responses 2 instead of 1 (2 cases) |
| `chat-goal-created-yield.e2e` | Goal script off by one call |

`server.goal-child-authority.product` had the same cause. It is already fixed on main by openclaw#208478, so this PR keeps main's version.

## User Impact

No product change. These tests turn green again on main and keep proving:
- exactly one delivery for a retired source;
- one continuation per resolved cohort;
- a child kept behind a live requester;
- Goal authority across role loss;
- one completion per requester.

## Why This Change Was Made

The completion check is intended behavior of openclaw#208391; the test scripts were stale.
- A shared helper, `isCompletionCheckRequest`, recognizes a request whose newest input is the check.
- Each script answers that request with `NO_REPLY`, the way a model with nothing left to advance would. openclaw#208478 uses the same model answer.

Echoing the previous final was tried first. The Goal product test then recorded the requester's final twice, because the run publishes the first final before the check.

## Evidence

- Bisect for the scheduled red (run 46283967087): the product files pass at 5c70bf5~1 (15/15) and fail at 5c70bf5 (10 failed). Main at d6ba225 fails the same 10.
- PR CI found the two e2e scripts through the helper's importers; each failed the same way.
- With this branch on current main: all 6 files pass locally (20/20 tests, including main's goal-child version).

Co-authored-by: Ayaan Zaidi <[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 gateway Gateway runtime impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants