Repository navigation
fix: let recurring automations start while a previous run still has work - #207148
Conversation
Do not claim the prior base row's session ID when starting the next occurrence. Detached work can still own that ID. The new run keeps its own incarnation and its stable job key. Co-authored-by: VACInc <[email protected]>
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 1d38277d-6e61-4758-95ab-48689d4e97f2
|
🦞👀 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: passed. What this changesRemoves the previous occurrence’s session ID from the controller aliases claimed when preparing an automation run. Example: The daily-monitor automation starts again while background work retains its earlier session.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a source-verifiable recurring-run failure that remains on main; no introduced correctness or security defect was found. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCron preparation resolves a job’s session, claims controller custody, and passes the admitted session to agent execution and persistence. flowchart TD
A[Recurring automation] --> B[Stable job admission]
B --> C[Resolve occurrence session]
C --> D[Claim controller custody]
D --> E[Agent execution]
E --> F[Session persistence]
Technical reviewBest possible solution: Keep the existing job admission owner and identify each occurrence using its current session rather than its predecessor’s ID. Do we have a high-confidence way to reproduce the issue? The retained previous-session alias can select a second controller alongside the stable job controller, reaching the exact reported exception; no target code was executed during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair at the alias producer: it removes the conflicting predecessor identity while preserving current-incarnation custody and existing serialization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3d1f9dfb3276. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +28. Total +28 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 November 27, 2026, 9:52 PM ET / November 28, 2026, 02:52 UTC. |
|
Merged via squash.
|
…ork (openclaw#207148) * fix: keep recurring jobs separate from their previous run Do not claim the prior base row's session ID when starting the next occurrence. Detached work can still own that ID. The new run keeps its own incarnation and its stable job key. Co-authored-by: VACInc <[email protected]> * fix: let recurring automations start while a previous run still has work Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 1d38277d-6e61-4758-95ab-48689d4e97f2 --------- Co-authored-by: VACInc <[email protected]>
…ork (#207148) * fix: keep recurring jobs separate from their previous run Do not claim the prior base row's session ID when starting the next occurrence. Detached work can still own that ID. The new run keeps its own incarnation and its stable job key. Co-authored-by: VACInc <[email protected]> * fix: let recurring automations start while a previous run still has work Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 1d38277d-6e61-4758-95ab-48689d4e97f2 --------- Co-authored-by: VACInc <[email protected]> (cherry picked from commit e758f2e) Co-authored-by: RomneyDa <[email protected]>
…ork (#207148) * fix: keep recurring jobs separate from their previous run Do not claim the prior base row's session ID when starting the next occurrence. Detached work can still own that ID. The new run keeps its own incarnation and its stable job key. Co-authored-by: VACInc <[email protected]> * fix: let recurring automations start while a previous run still has work Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 1d38277d-6e61-4758-95ab-48689d4e97f2 --------- Co-authored-by: VACInc <[email protected]> (cherry picked from commit e758f2e) Companion audit: No later same-path, PR, or source-SHA follow-up found through pinned main. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
A daily automation could finish one run, then fail before starting the next with
Session controller identity requires a physical store scope. This happened when background work still held the earlier run’s session. The error looked like a store configuration problem even though both sessions were in the right store.User Impact
The next occurrence can start a fresh session without interrupting or taking over the previous one. No configuration change or migration is needed. This does not re-enable disabled jobs or change who may run an automation.
Why This Change Was Made
The stable job key already serializes preparation. The new occurrence has its own session ID; also claiming the ID from the previous job row made two different controllers match. Drop only that old ID from the lookup. The physical store, job key, current session ID, and lifecycle revision still identify the new run.
Evidence
currentjob twice through an isolated Gateway, with the first run’s session still in use. On base58e358887b85, the secondcron.runsentry recorded the exact error above. With the fix, both occurrences reached the local fixture model endpoint, used different session IDs, and left the first session’s work active. No production monitor or external model account was used.git diff --checkpassed.58e358887b85..b544660623df. The published headaa11482bd3f8has the same tree. Required CI passed (12 min 15 s for the workflow), and hosted ClawSweeper passed with no findings on that exact head.Worked on by
Work sessions
Linked for team reference; these sessions aren’t public.