-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[RFC] Agent-facing scheduling API with non-forgeable provenance #71712
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
Document and harden a path for agents (not just operators) to create/modify their own recurring cron jobs at runtime, with non-forgeable provenance captured by the gateway rather than self-reported by the agent.
Today,
openclaw cron addis operator-facing and writes~/.openclaw/cron/jobs.jsondirectly. Agents on the same pod with shell access can also write to that file. There's no documented agent-facing API, no allowlist on what kind of jobs an agent can create, and no provenance system distinguishing "the operator added this" from "the agent added this in response to a prompt-injected email."Why this matters
The dominant 2026 attack pattern against agentic systems is memory poisoning: prompt-injected content plants instructions that the agent treats as legitimate and recalls in future sessions. A writable, agent-modifiable schedule is the ideal substrate for memory poisoning — the attacker plants once, the agent fires the malicious task on a recurring schedule indefinitely.
References:
Operators today either (a) don't let agents schedule anything (loses operational utility) or (b) let them write
jobs.jsondirectly (security regression). A documented middle path would benefit the ecosystem.Proposed surface
An agent-facing tool — exposed by the gateway, NOT by giving agents shell access — that wraps cron creation with the following invariants:
Critical invariants enforced by the gateway, not the agent:
playbookis an allowlisted identifier, not free-formmessage/steps.Playbooks live in operator-shipped config (e.g.,
~/.openclaw/playbooks/<name>.mdwith a declared parameter schema). Agents reference them by name. If the playbook isn't registered, the call is rejected.createdByis gateway-injected, not in the request payload. Source is the requesting session's identity (agent ID + session ID). Agents can't forge it.createdAtis gateway-injected.activeUntilis required for recurring schedules (matches the sister proposal [Feature] activeUntil / expiresAt for recurring cron jobs #71711). Agents can't create infinitely-recurring tasks.openclaw tasks auditsurface is a good fit.An optional
enabled: falsetoggle would let humans disable an agent-scheduled task without removal, preserving the audit trail.What this isn't
openclaw cron add— operators still get the full unrestricted CLI.Open questions
paramsbe hash-signed by the playbook registration so agents can't tamper post-create?~/.openclaw/playbooks/to mirror~/.openclaw/hooks/.scheduler.writeon top of existing tool gates)?Why open this RFC now
OpenClaw's cron and tasks surfaces are mature; the gap is specifically agent-vs-operator capability separation. Multiple operators are already writing private wrappers around
jobs.jsonto give their agents this capability. Standardizing prevents fragmentation and bakes in security defaults.Happy to prototype if the maintainers point me at a preferred shape.