Repository navigation
fix: continue active goals after the model ends a turn - #167897
Conversation
Queue repeated internal goal nudges through the existing reply owner, retaining cancellation, source delivery, budgets, and fresh goal/session admission. Give queued user input precedence over automatic goal work. Co-authored-by: jacobtomlinson <[email protected]>
Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: c3193443-1ded-43f9-ad61-e7f6ed7744af
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR queues hidden follow-up turns while a built-in session Goal remains active. Example: A Telegram user starts an unbudgeted goal to list primes across separate turns.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds useful, maintainer-directed Goal continuation that current main lacks, and the reviewed integration has no actionable code findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherBuilt-in reply finalization feeds eligible active goals into the existing follow-up queue, whose admission, execution and delivery owners produce subsequent assistant turns. flowchart TD
A[Normal turn finishes] --> B[Completion accounting]
B --> C[Goal eligibility]
C --> D[Existing follow-up queue]
D --> E[Session and authority admission]
E --> F[Agent execution and delivery]
F --> B
Technical reviewBest possible solution: Retain the existing queue-based implementation and demonstrate the accepted continuation default with preserved settings and goals across a supported stable-release upgrade. Do we have a high-confidence way to reproduce the issue? Current main completes ordinary replies without scheduling another active-Goal turn; source inspection establishes the missing driver, and no target code was executed during this review. Is this the best way to solve the issue? Reusing the canonical follow-up queue is a coherent solution: user input wins, Goal identity is rechecked at admission, and existing completion, authority and cancellation owners remain authoritative. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a0436bfd2841. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +290, Tests +578, Docs +30. Total +898 across 13 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (10 earlier review cycles; latest 8 shown)
Reviewed October 14, 2026, 8:52 AM ET / 12:52 UTC (Revision 11). |
Co-authored-by: jacobtomlinson <[email protected]>
Runtime authority proof — exact head 26c4a63Generated and publicly posted real execution evidence: inspected report · artifact manifest. Signed artifact links expire October 17; this durable summary remains in the comment. Readback verified HTTP 200 and matching SHA-256 for the report and principal ledgers. This is real TLS/WS authentication, host-issued authority, automatic goal admission/queue, tool dispatch and SQLite state, using deterministic synthetic HTTP inference, not live-model inference. All identities and resources were disposable.
The last row is not disguised as green. The candidate refused an assistant append before tool execution. Observation-only diagnostics located the throw at session-manager-metadata.worker.ts:334 after validatePreparedAssistantAppendSync returned undefined. The generic error says “preparing rewrite,” but this run did not establish a rewrite defect or an authority-scope denial. Waiting for the later committed user row did not remove the conflict. A harness exit-0 replay was rejected on inspection because it lacked a correlated tool result; the reviewed ledger records that limit. No guard was weakened and no product fix is claimed. Original five completed cases: 69.68s within an overall exit-1 six-case run. Separate same-action administrative control: 123.39s, exit 0, correlated successful tool result and durable effect, no lifecycle errors. Later-input replay: 77.38s, exit 0 but not an authorization pass; stricter diagnostic: 69.90s, exit 1. Source/archive/overlay hashes, exact launchers, event ledgers and final-effect readers are linked. Core and workers ran from the pinned candidate source archive; no old dist was mounted. Cleanup: all named task containers/private networks, Gateway/provider processes, profile state and credential scratch removed. Tracked worktree clean; candidate/source and sanitized evidence retained. Historical upgrade: all thirteen planned v2026.9.9-to-candidate cases are NOT RUN. The seven-day npm release-age quarantine refused the exact baseline, and the exception was declined. No bypass, alternate acquisition or upgrade followed. That lane is closed, not waiting for another approval. A successful candidate build is not upgrade proof. Product default: accepted in ClawSweeper revision 8; no second goal-area approval is pending. Existing active unbudgeted built-in goals become eligible after an admitted normal turn; saved state alone does not start work at boot. Acceptance does not turn the unrun upgrade or inconclusive row into passing proof. ClawSweeper revision 9 completed on this exact head: it accepts the newly posted bounded authority proof, reports no actionable code findings, rates patch quality platinum hermit (4/6), and removes the security-boundary/needs-proof asks. Its only remaining pre-merge checklist item is historical data-model upgrade proof. That lane remains unrun under the explicitly declined quarantine exception; this is not renewed approval solicitation. The later-broader-input row remains accurately inconclusive. Canonical review. Current CI: run 38012729411 passed on this exact head, including openclaw/ci-gate. No tracked source changes or arbitrary CI reruns were needed for this proof. No merge, auto-merge or deployment is authorized or attempted. Retained cleanup, real Telegram/model, and CI repair evidenceAddressing the review in the existing branch. The skipped-admission cleanup defect is reproduced by nine failing assertions and repaired in Live proof passed on the published head and tree
There were 18 real Responses POSTs with HTTP-200 headers and 8 successfully persisted assistant completions, also observed as eight distinct TDLib messages. These are not 18 completed assistant turns. The transport recorder retained code-20 cancellation callbacks after response headers; native completions and delivered TDLib messages are the successful-result oracles. Runner exit was 0 and every scenario control completed. Source/runner/provider hashes were unchanged; both Gateway starts loaded the repaired admission source. Existing credentials were used privately; all leases were released, services/listeners joined, and credential/runtime scratch removed. Reproduction entrypoint: Limits: this proves persistence across a same-candidate isolated restart and continuation after a fresh admitted turn—not idle boot auto-resumption, a historical-version upgrade, completion of the entire synthetic objective, or separately fault-injected Telegram skipped-admission cleanup. Stop retains the saved goal as CI repairs on
|
Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: e415b68b-c4b6-4324-b052-e4d31acdb364
|
@clawsweeper re-review — repaired skipped-admission presentation ownership in 613f110. Both paths now settle once; generation fencing is unchanged. Removed the duplicate mocked recurrence test. See the author response for regression, provenance, product-decision, and live-proof dispositions. |
|
🦞👀 Re-review progress:
|
b7e8652 to
bb7f7ec
Compare
|
@clawsweeper re-review — two CI fixture repairs on 26c4a63, with unchanged runtime safety logic and preserved behavioral assertions. The existing author response now records both root causes, CI-runtime red/green proof, and completed independent review. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Real, source-bound automatic-successor effect evidence is now posted in the canonical disposition, with inspected artifacts and same-action administrative positive control. Head remains 26c4a63; no code changed. Six scoped cases pass; the later-broader-input case is explicitly inconclusive because the stale-assistant append fence prevents tool settlement. Historical v2026.9.9 upgrade remains unrun after the npm quarantine exception was declined. Please assess the actual evidence and remaining limits; no merge/automerge requested. |
|
🦞👀 Re-review progress:
|
Preserve both goal-admission cleanup and upstream transcript-target regressions. Share the duplicate goal fixture to keep the combined suite within its line budget. Co-authored-by: jacobtomlinson <[email protected]>
Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: 132abb4f-cd7f-4a43-9f5d-fe0a3f93720e
Keep required-preflight coverage separate from foreground overflow pressure, and seed MCP resources explicitly now that memory inference excludes auxiliary tools. Preserve compaction, transcript, permission, cancellation, and retirement assertions. Co-authored-by: jacobtomlinson <[email protected]>
Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: 1308215a-90f8-468f-95eb-1e1362c89282
Keep the Gateway goal fixture under its existing line cap by sharing its unchanged reply-dispatch hook. Avoid accounting-name shadowing in the rebased completion integration. Co-authored-by: jacobtomlinson <[email protected]> Co-authored-by: RomneyDa <[email protected]>
26c4a63 to
c31c8a9
Compare
|
@clawsweeper re-review Requested rebase/conflict resolution is published at c31c8a9 on pinned main c7dd7b9. Please review the current completion-actor/retained-operation and goal-admission integration. Authored merge topology, both admission regression groups and prior cleanup are preserved; current main already contains the two CI fixture fixes. The updated body records focused tests, final independent P0–P2 review (no findings), and an exact-baseline environment-count guard failure. Prior live proof remains historical; do not reopen the explicitly declined package-age exception. Review only—no merge or auto-merge. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix: keep active goals moving after normal replies Queue repeated internal goal nudges through the existing reply owner, retaining cancellation, source delivery, budgets, and fresh goal/session admission. Give queued user input precedence over automatic goal work. Co-authored-by: jacobtomlinson <[email protected]> * fix: continue active goals after the model ends a turn Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: c3193443-1ded-43f9-ad61-e7f6ed7744af * fix: clean up skipped goal continuation presentation Co-authored-by: jacobtomlinson <[email protected]> * fix: continue active goals after the model ends a turn Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: e415b68b-c4b6-4324-b052-e4d31acdb364 * Publish openclaw/goal-continuation-root-cause Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: 132abb4f-cd7f-4a43-9f5d-fe0a3f93720e * test: isolate memory maintenance CI fixture contracts Keep required-preflight coverage separate from foreground overflow pressure, and seed MCP resources explicitly now that memory inference excludes auxiliary tools. Preserve compaction, transcript, permission, cancellation, and retirement assertions. Co-authored-by: jacobtomlinson <[email protected]> * Publish openclaw/goal-continuation-root-cause Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: 1308215a-90f8-468f-95eb-1e1362c89282 * test: preserve goal coverage within current check contracts Keep the Gateway goal fixture under its existing line cap by sharing its unchanged reply-dispatch hook. Avoid accounting-name shadowing in the rebased completion integration. Co-authored-by: jacobtomlinson <[email protected]> Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: jacobtomlinson <[email protected]> Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes unfinished active goals stopping when the model ends a normal turn.
User Impact
Built-in goals continue through separate hidden nudges until complete, blocked, paused, limited or stopped. User input and existing tool/child continuations take priority. The accepted default includes existing unbudgeted active goals after an admitted turn; saved state alone does not start work at boot. No new scheduler, configuration option or storage schema.
Why This Change Was Made
Reuse the existing follow-up queue and its admission, original-authority, delivery and cancellation owners. The October 14 rebase preserves the authored resolution merge and cleanup regressions while integrating current completion-actor accounting, retained reply-operation lifetime and admitted model-selection facts. Both admission regression groups remain. Earlier CI fixture repairs are already present on current main; their replay is retained as an empty provenance commit.
Evidence
openclaw/ci-gatechecks passed.Worked on by
Work sessions
View the OpenClaw team session