Repository navigation
Description
Summary
Add a first-class durable routines registry for named team-operation routines, starting with schedule-backed routines that delegate execution to the existing Gateway cron scheduler.
Problem
OpenClaw already has cron jobs for precise schedules, the task ledger for detached execution history, heartbeat for flexible awareness, and commitments for inferred follow-ups. Operators still need a durable routine object that describes the repeatable operational intent: owner, delivery target, enabled state, trigger, backing scheduler record, last/next run, status, and last error.
Using raw cron jobs alone makes routine management low-level. It also leaves no typed trigger model for future channel-watch, repository-event, or webhook triggers without adding a second subsystem later.
Proposal
Create a typed routine registry in the shared state database with create/list/inspect/enable-disable/delete operations. Implement only the first trigger kind, schedule, and compile it to a canonical cron job instead of duplicating scheduling or execution.
Initial scope:
- routine identity, name, description, owner agent/session, and delivery target metadata
- schedule trigger that stores the backing cron job id
- last/next run, enabled state, status, and error visibility from the backing cron job
- idempotent create/delete/enable-disable behavior for automation callers
- CLI or gateway entry point for operators
- docs and behavior tests
Future triggers should fit the same trigger.kind model, but this issue should not implement channel-watch, repository-event, webhook, or Control UI surfaces unless they are already trivial through existing primitives.
Alternatives Considered
- Continue using raw cron jobs only. This preserves scheduler behavior but does not give operators a routine-level object or a future trigger model.
- Put routines directly in agent config. That overlaps with the existing cron config discussion in Feature Request: Add
cronfield to Agent configuration for Agent-owned scheduled tasks #46590 and makes mutation and status visibility harder. - Fold this into the broader scheduling authority work in [RFC] Agent-facing scheduling API with non-forgeable provenance #71712. That remains useful for policy and provenance, but this issue is a smaller product slice over existing admin-authored scheduler operations.
- Build UI first. Control UI session-management work is active in feat: add session thread management #98510, so the initial slice should avoid that surface and expose CLI/protocol first.
Impact
Operators get a small, durable routine layer for recurring team-operation work while OpenClaw keeps one scheduler, one task ledger, and one execution path. Cron remains responsible for timing and run execution; tasks remain the activity ledger.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jul 1, 2026
Codex review: this still needs some work. Reviewed October 8, 2026, 3:28 PM ET / 19:28 UTC.
Summary
Keep this protected maintainer issue open for human disposition. The central schedule-backed workflow is already supported by Automations, and the merged replacement explicitly chose against a separate routines registry.
Reproducibility: not applicable. This issue proposes a capability rather than reporting a failure; current source and documentation establish the existing schedule-backed workflow.
Root-cause cluster
Relationship:
supersededCanonical: #100480
Summary: The merged cron-native replacement owns the central schedule-backed capability; the separate registry proposal was explicitly superseded.
Members:
canonical: feat(cron): declarative jobs with owner attribution and richer status #100480 - Merged the selected implementation of declaration-key convergence, ownership, and richer job status.superseded: feat: add durable routines registry #98727 - Closed unmerged with an explicit decision to fold its useful capabilities into canonical cron jobs.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
The protected issue remains for human disposition; shipped cron-native capabilities and the settled design leave no focused repair to dispatch.
Review details
Best possible solution:
Keep Automations as the single durable scheduling owner and build any future trigger capabilities on that surface, following the recorded product decision.
Do we have a high-confidence way to reproduce the issue?
Not applicable: this issue proposes a capability rather than reporting a failure; current source and documentation establish the existing schedule-backed workflow.
Is this the best way to solve the issue?
No: a separate registry would duplicate canonical job state, and the recorded product decision already selected additive cron features.
AGENTS.md: found and applied where relevant.
Codex review notes: model internal, reasoning medium; reviewed against 6070074dabf6.
Label changes
Label changes:
No label changes.
Label justifications:
P3: This is a feature proposal whose central operator capability has shipped; no current broken workflow is established.Evidence reviewed
What I checked:
src/cron/service/ops-mutations.ts:124, 6070074dabf6)src/cron/types.ts:330, 6070074dabf6)src/cron/service.declarative-jobs.test.ts:131, 6070074dabf6)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon Oct 24, 2026
Thanks for filing this. We're closing older issues that no longer look actionable on current
main.Schedule-backed team routines are covered by Automations on top of the cron scheduler, and the replacement work deliberately chose not to add a separate routines registry.
OpenClaw has changed a lot since this was filed. If this still affects you on the latest release, please open a fresh issue with your version and repro steps (feel free to link back here).