Repository navigation
fix: goals fail to resume after stopping a run - #185273
Conversation
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: cb8ca5ec-cfb9-4612-bac7-2609b5ae6115
|
🦞👀 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. |
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: b9c1dfaf-60fd-4dbd-9daf-fc973f93a217
|
Codex review: needs maintainer review before merge. What this changesThis PR allows explicit Goal Resume after stopped work settles and classifies unsupported admission as a definitive rejection. Example: Stop the goal “Finish a three-turn checklist,” wait for settlement, then choose Resume.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR addresses a current Goal Resume failure with a focused change to existing admission owners; no introduced correctness defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGoal controls enter through Gateway RPCs, pass session and lifecycle admission, and commit through existing transcript and Goal operation owners before model execution. flowchart TD
A[Operator Resume] --> B[Goal RPC owner]
B --> C[Chat admission]
C --> D[Session lifecycle and authority checks]
D --> E[Local or worker execution]
E --> F[Goal and transcript state]
C --> G[Typed rejection response]
Technical reviewBest possible solution: Use the existing Resume admission and rejection owners while preserving settlement, current authority, session identity, and replay guarantees. Do we have a high-confidence way to reproduce the issue? Current-main source rejects ordinary Resume when abortedLastRun is true; the extended production-admission regression covers that exact state, and the PR reports it failed before the fix. Is this the best way to solve the issue? The patch is the smallest complete repair: broaden the existing explicit Resume distinction, reuse typed rejection handling, and extend existing regression coverage without adding state or another owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ed141d019864. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +7, Tests +34, Docs +1. Total +42 across 7 files. Added test files: 0. View PR surface stats
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 Reviewed October 26, 2026, 9:13 PM ET / October 27, 2026, 01:13 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* fix: goals fail to resume after stopping a run Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: cb8ca5ec-cfb9-4612-bac7-2609b5ae6115 * Publish openclaw/tide-shrimp Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: b9c1dfaf-60fd-4dbd-9daf-fc973f93a217 --------- Co-authored-by: jjjhenriksen <[email protected]>
What Problem This Solves
Fixes: Goal Resume fails with “requires an idle built-in local session with recoverable history” after an operator stops a run, even after that work has fully settled. Definitive admission refusals also appear as an unconfirmed update.
User Impact
Operators can resume the same stopped Goal without resetting the conversation or losing its history. Unsupported admission is reported as a rejection instead of leaving an uncertain operation waiting for reconciliation.
Why This Change Was Made
Explicit Resume may follow a settled abort, not just the special running-Goal replacement flow. Apply that distinction to local and supported Codex cloud-worker admission, while retaining live-work exclusion, freshness, placement, session identity, and current-authority checks. Use the existing typed Goal rejection contract so the existing UI can retire the refused request. Ordinary chat and Goal Start eligibility are unchanged.
Evidence
5516b9086e6092af42dac1ac42e635267e70d3b5into the contributor branch after the admission-owner refactor. The retired restart-recovery module stays deleted; both current local and worker Resume predicates receive the fix.5516b9086e6092af42dac1ac42e635267e70d3b5..60ff8e09bbe2922b9da9459fd5ca86c5cfe0259bcompleted with no actionable P0-P2 findings. A separate independent source review also found no blockers.src/gateway/server-shutdown.runtime.test.tsandsrc/gateway/server.spawn-broker.test.ts. Main independently reports the same 14 violations. The two tests, baseline ledger, checker and inspected checker inputs are unchanged between the protected-main parent and the tested PR merge.security-fastpassed; all other jobs passed or were skipped. CI remains failed and is recorded in native pre-existing-failure evidence for landing; no CI rerun or unrelated source repair is claimed.Real Behavior Proof
goal-invalidrejection.provider=local-container, leasecbx_bff6cd3713ae, runrun_76ce59bd0f38; Linux,node:24-bookworm, Node 24.20.0, pnpm 12.15.0, one test worker and bounded compiler threads. Canonical baseline source plus the six-file reviewed patch reconstructed tree116593a9972df7b5c36a050230d4f7bf14ed5d01, checked before execution; source hashes were checked and restored after the baseline replay.green.log,ui-green.log,red.log, andreceipt.json. Summary of the captured output:{"proof":"goal-stop-settlement-resume","green":{"passed":42},"uiPassed":33,"baselineRegressionFailures":2,"canonicalTree":"116593a9972df7b5c36a050230d4f7bf14ed5d01"}The proof command exited 0 and its captured receipt was verified. Crabbox's controller subsequently exited 7 on a workspace-owner renewal after lease release; the owned container's removal was verified. This cleanup diagnostic is separate from the executed test results.
Work sessions
Worked on by