Repository navigation
fix: keep resumed Goals running after Gateway restarts - #181102
Conversation
Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: e1c3cb84-2759-4fb2-bc58-221b2729f29e
|
🦞👀 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 changesPreserve restart-recovery authority for authenticated Goal Resume operations while keeping their transcript input hidden. Example: An operator resumes “Finish the release checklist,” then the Gateway process crashes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR provides a focused repair still needed on main; no actionable introduced defects remain, and the captured output satisfies the prior proof request. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGoal RPC admission validates the operator and session, records the continuation through the existing transcript owner, and supplies durable source facts to restart recovery. flowchart TD
A[Operator Resume] --> B[Goal RPC authorization]
B --> C[Chat admission]
C --> D[Transcript and recovery source]
D --> E[Gateway restart recovery]
E --> F[Current authority checks]
F --> G[Provider and tool effects]
Technical reviewBest possible solution: Merge the narrow Resume capture correction using the existing recovery and live-authority owners. Do we have a high-confidence way to reproduce the issue? Current source assigns Resume internal-system provenance, which the recovery-source predicate excludes; the PR also reports a base-failing admission regression and supplies passing process-replacement output, without this review executing target code. Is this the best way to solve the issue? The patch fixes classification at the existing capture boundary without changing transcript attribution, widening general internal-input eligibility, or introducing another recovery owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2abd386a6dbc. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +379. Total +384 across 3 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel 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 HistoryReviewed October 22, 2026, 9:29 PM ET / October 23, 2026, 01:29 UTC (Revision 3). |
Co-authored-by: steipete <[email protected]>
Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 88fd153e-2190-4e4b-8dbb-156225624daa
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes: a Goal explicitly resumed by an operator can stop after a Gateway restart instead of continuing automatically.
User Impact
Resumed Goals retain their authorized restart continuation. Pressing Stop still prevents recovery. No configuration or migration is required.
Why This Change Was Made
Goal Resume is an authenticated operator action, but its hidden transcript message is marked as internal. That marker inadvertently excluded the action from restart-authority capture. Classify only the validated Resume operation as operator input for this capture, without changing its transcript provenance. Existing live-authority, scope, execution-lineage, and incognito checks remain in place.
Evidence
Live model and recovered-effect verification
device.token.revokewhile its recovered model response is held. Releasing that stale tool response produces no filesystem effect, no follow-up provider request, and no success reply; neither stopped nor revoked control resurrects on the next restart. This run passed in 29.54 seconds.Captured passing run output (local fixture paths omitted)
Cold-process effect/revocation run; the only omitted JSON field is the disposable local
stateRootpath:{ "proof": "goal-resume-cold-restart", "pids": [ 2123960, 2126763, 2128675 ], "resumeCalls": { "continue": 4, "stop": 1, "revoked": 2 }, "allowedRecoveredEffect": true, "revokedEffectAbsent": true, "entrypoint": [ "dist/index.js" ], "node": "v26.3.0" }The four continue requests include its allowed tool-result follow-up. The revoked count of two is its original request plus the recovered request already in flight when revoked; it does not increase after the held response is released. The passing committed test also asserts no revoked success reply and no resurrection after the next process replacement.
Separate real-provider run:
{ "proof": "live-model-goal-resume", "pids": [ 2182702, 2188463 ], "commandPids": [ { "name": "continue", "pid": 2187216, "ppid": 2187215 }, { "name": "stop", "pid": 2188283, "ppid": 2188282 }, { "name": "continue", "pid": 2192351, "ppid": 2192350 } ], "model": "openai/gpt-5.4", "marker": "LIVE_GOAL_RECOVERED_3d7415ea-4673-454d-bdb3-bd8a6002391f", "entrypoint": [ "dist/index.js" ], "node": "v26.3.0", "delivered": { "provider": "openai", "model": "gpt-5.4" }, "stoppedSiblingRemainedStopped": true }The process tests cover cold process replacement, not browser clicks or a managed-service deployment. The E2E reuses the existing Gateway fixture and is skipped on Windows because it uses SIGKILL.
Credit: @steipete for requesting the reliability audit and repair.
Work sessions
Worked on by