Repository navigation
feat(agents): rename scheduler agent tool cron -> automations - #114841
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 3:00 AM ET / 07:00 UTC. ClawSweeper reviewWhat this changesThis PR renames OpenClaw’s scheduler tool from Merge readinessKeep this PR open for maintainer review rather than cleanup. The supplied diff consistently publishes Priority: P2 Review scores
Verification
How this fits togetherThe scheduler tool is assembled into agent tool lists and then exposed through Gateway and MCP dispatch. Its identifier also controls tool policy, owner-only authorization, persisted allowlists, transcript replay classification, and model-facing tool descriptions. flowchart LR
A[Agent and MCP callers] --> B[Tool-name resolution]
C[Persisted allow and deny lists] --> B
B --> D[Automations scheduler tool]
D --> E[Gateway scheduler RPC]
B --> F[Authorization and transcript safety]
F --> G[Gateway and MCP responses]
Decision needed
Why: The PR changes a user-visible tool identity and intentionally establishes an indefinitely supported compatibility contract across policy, Gateway, MCP, and saved state; the Before merge
Agent review detailsSecurityNone. PR surfaceSource +89, Tests +79. Total +168 across 56 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Land the canonical Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a planned tool-identity and terminology change rather than a report of a currently failing behavior. The supplied live proof does exercise the post-change user and upgrade paths. Is this the best way to solve the issue? Yes, conditionally: one canonical published tool name plus a tested compatibility alias is more maintainable than exposing duplicate scheduler tools. The remaining requirement is to validate the current-main merge result before accepting the permanent alias contract. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against e4e7f37d246e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Owner decision (maintainer: @omarshahine), resolving the open ClawSweeper finding on legacy policy names:
|
…al identity Introduce AUTOMATIONS_TOOL_NAME + isAutomationsToolName() in src/agents/tools/automations-tool-name.ts as the single source of truth for the scheduler agent tool's name, and convert every exact-name consumer: factory descriptors, deferred-followup availability detection, add-counting, policy deny lists, mutation classification, trusted media set, tool catalog id, system-prompt tool order and tool-line map, sandbox deny defaults, delegation capability map, MCP loopback probes, and local-model lean deny. Behavior-neutral: the constant still resolves to "cron". Prepares the rename in RFC openclaw/rfcs#50 so the flip is a one-line change with no scattered literals.
Flip AUTOMATIONS_TOOL_NAME to "automations" and register the legacy name:
- TOOL_NAME_ALIASES gains cron -> automations, so persisted toolsAllow/
toolsDeny lists, tool groups, and creator allowlists written before the
rename keep matching through the same shipped mechanism as bash -> exec.
No doctor rewrite needed.
- isAutomationsToolName() accepts legacy names so saved transcripts keep
their mutation/replay-safety classification; MUTATING_TOOL_NAMES retains
the legacy entry for the same reason.
- Tool label, catalog label, and tool-search keywords follow the rename
("cron" kept as a search synonym).
- Regression tests cover old-name policy matching (allow and deny), legacy
transcript replay classification, and legacy creator allowlists
normalizing to the canonical id.
Model-facing description strings still say cron; those move in the
follow-up strings PR. Part of RFC openclaw/rfcs#50 Phase 1.
…ns id The creator tool surface derives from normalized live tool names, so derived toolsAllow outputs now emit "automations". Passthrough paths without a creator cap keep storing user input verbatim; those expectations stay on the legacy name as stored-data coverage.
…er deny protection Review follow-ups from ClawSweeper and Codex on the rename (RFC 0026): - MCP loopback tools/call resolves legacy "cron" names to the published automations tool without re-advertising the old name in tools/list. - Gateway /tools/invoke canonicalizes legacy names before core-id checks and exact-name dispatch, so pre-rename integrations keep working. - Security fix: dangerous-tools deny lists (owner-only HTTP deny and control-plane set) were keyed on the literal "cron", so the renamed tool silently lost default-deny and owner-only protection on the HTTP invoke surface. Lists now use the canonical constant, and the gateway.tools.allow un-deny filter normalizes both sides so legacy allow entries still lift it. - Voice high-impact confirmation list and MCP serve creator allowlist follow the canonical name. Existing cron-regression suite now proves the legacy path end to end: default deny 404 for both names, legacy allow entry lifts the deny, and non-owner protection holds.
…snapshots for the rename - stdio MCP servers (openclaw-tools-serve / plugin tools handlers) resolve legacy "cron" callTool names to the published canonical tool, matching the HTTP loopback behavior; listTools stays canonical-only. - Live probe prompts instruct harnesses to load/call the automations MCP tool (mcp__openclaw__automations) instead of the retired name. - Prompt snapshot fixture filter follows the canonical name (the renamed tool had silently dropped out of the Codex dynamic-tools snapshots); snapshots regenerated as a clean rename. - Type-cast the new mcp-http handler test payloads for check-test-types.
…name CI-surfaced fallout in shards not covered by the focused local runs: tool availability, agent-config filtering, coding-tools construction, model-provider lean policy, and skill dispatch all assert the scheduler tool's surface name. Mock fixtures and expectations follow the canonical id; legacy-name coverage stays in the dedicated policy/creator-cap/invoke regression suites.
… decision Maintainer decision (Omar): cron is not being retired anywhere — config keys, RPC methods, schedule syntax, and the CLI token all keep it, and the tool alias follows the same permanent contract as bash -> exec. No doctor rewrite and no removal window; comments updated to state the contract instead of a deprecation plan.
a4a383e to
a777a3f
Compare
…d reuse the identity source Review follow-ups: the structured-list fallback still taught models the cron tool; the cron-scope test echoed its own stub; MCP serve allowlist and voice confirmation hardcoded the name instead of the canonical constant.
|
Thanks — all findings addressed on
|
|
@clawsweeper re-review New evidence since the last review: a live combined-payload upgrade proof on a Blacksmith Testbox has been added to the PR body ("Combined-payload upgrade proof" section) — released 2026.7.1-2 install, legacy cron jobs created via released gateway RPC, in-place upgrade to the integration build (all five stack PRs on current main), token parity, renamed help, doctor, and live /tools/invoke with both the legacy |
|
Merged via squash.
|
* origin/main: (99 commits) docs(automation): rename scheduled-tasks feature wording to Automations (#114855) feat(ui): finish cron -> Automations rename in visible strings (#114853) feat(cli): add openclaw automations alias and reword cron display prose (#114854) feat(agents): rename scheduler agent tool cron -> automations (#114841) fix(tui): preserve session state across switches and reconnects (#116399) feat(agents): report CLI command outcomes in channel progress fix(cli): preserve explicit option intent (#116389) fix(release): trust update restart harness (#116301) test(reef): remove false-green live guard smoke (#116393) test(comfy): evaluate live guards after setup (#116388) fix(heartbeat): serialize wake lifecycle state (#116351) test: remove redundant extension boundary wrapper (#116385) fix(test): bound Testbox agentic and extension suites (#115696) fix(ui): show the correct Threads page size (#116349) test(discord): align progress timing expectations (#116377) feat(ui): add composable skill references (#116330) fix(qa): prevent Slack cleanup from stalling profile runs (#116361) fix(ci): validate frozen release candidates faithfully (#116357) improve(ci): fail_fast option for release validation, off by default (#116352) fix(agents): compare shell tool names case-insensitively and stop re-parsing tool labels ...
…aw#114841) * refactor(agents): route scheduler tool-name consumers through canonical identity Introduce AUTOMATIONS_TOOL_NAME + isAutomationsToolName() in src/agents/tools/automations-tool-name.ts as the single source of truth for the scheduler agent tool's name, and convert every exact-name consumer: factory descriptors, deferred-followup availability detection, add-counting, policy deny lists, mutation classification, trusted media set, tool catalog id, system-prompt tool order and tool-line map, sandbox deny defaults, delegation capability map, MCP loopback probes, and local-model lean deny. Behavior-neutral: the constant still resolves to "cron". Prepares the rename in RFC openclaw/rfcs#50 so the flip is a one-line change with no scattered literals. * feat(agents): rename scheduler agent tool cron -> automations Flip AUTOMATIONS_TOOL_NAME to "automations" and register the legacy name: - TOOL_NAME_ALIASES gains cron -> automations, so persisted toolsAllow/ toolsDeny lists, tool groups, and creator allowlists written before the rename keep matching through the same shipped mechanism as bash -> exec. No doctor rewrite needed. - isAutomationsToolName() accepts legacy names so saved transcripts keep their mutation/replay-safety classification; MUTATING_TOOL_NAMES retains the legacy entry for the same reason. - Tool label, catalog label, and tool-search keywords follow the rename ("cron" kept as a search synonym). - Regression tests cover old-name policy matching (allow and deny), legacy transcript replay classification, and legacy creator allowlists normalizing to the canonical id. Model-facing description strings still say cron; those move in the follow-up strings PR. Part of RFC openclaw/rfcs#50 Phase 1. * test(agents): update creator-cap expectations for canonical automations id The creator tool surface derives from normalized live tool names, so derived toolsAllow outputs now emit "automations". Passthrough paths without a creator cap keep storing user input verbatim; those expectations stay on the legacy name as stored-data coverage. * fix(gateway): canonicalize legacy cron tool calls and restore scheduler deny protection Review follow-ups from ClawSweeper and Codex on the rename (RFC 0026): - MCP loopback tools/call resolves legacy "cron" names to the published automations tool without re-advertising the old name in tools/list. - Gateway /tools/invoke canonicalizes legacy names before core-id checks and exact-name dispatch, so pre-rename integrations keep working. - Security fix: dangerous-tools deny lists (owner-only HTTP deny and control-plane set) were keyed on the literal "cron", so the renamed tool silently lost default-deny and owner-only protection on the HTTP invoke surface. Lists now use the canonical constant, and the gateway.tools.allow un-deny filter normalizes both sides so legacy allow entries still lift it. - Voice high-impact confirmation list and MCP serve creator allowlist follow the canonical name. Existing cron-regression suite now proves the legacy path end to end: default deny 404 for both names, legacy allow entry lifts the deny, and non-owner protection holds. * fix(agents): cover stdio MCP legacy calls, probe prompts, and prompt snapshots for the rename - stdio MCP servers (openclaw-tools-serve / plugin tools handlers) resolve legacy "cron" callTool names to the published canonical tool, matching the HTTP loopback behavior; listTools stays canonical-only. - Live probe prompts instruct harnesses to load/call the automations MCP tool (mcp__openclaw__automations) instead of the retired name. - Prompt snapshot fixture filter follows the canonical name (the renamed tool had silently dropped out of the Codex dynamic-tools snapshots); snapshots regenerated as a clean rename. - Type-cast the new mcp-http handler test payloads for check-test-types. * test(agents): update tool-surface expectations for the automations rename CI-surfaced fallout in shards not covered by the focused local runs: tool availability, agent-config filtering, coding-tools construction, model-provider lean policy, and skill dispatch all assert the scheduler tool's surface name. Mock fixtures and expectations follow the canonical id; legacy-name coverage stays in the dedicated policy/creator-cap/invoke regression suites. * test(gateway): update tool-resolution exclude expectations for automations rename * test(security): update trust-model audit expectations for automations rename * docs(agents): declare cron a permanent scheduler-tool alias per owner decision Maintainer decision (Omar): cron is not being retired anywhere — config keys, RPC methods, schedule syntax, and the CLI token all keep it, and the tool alias follows the same permanent contract as bash -> exec. No doctor rewrite and no removal window; comments updated to state the contract instead of a deprecation plan. * chore(agents): regen prompt snapshots after rebase onto main * fix(agents): teach canonical automations tool in fallback guidance and reuse the identity source Review follow-ups: the structured-list fallback still taught models the cron tool; the cron-scope test echoed its own stub; MCP serve allowlist and voice confirmation hardcoded the name instead of the canonical constant. * fix(mcp): place automations identity import outside the header comment --------- Co-authored-by: Omar Shahine <[email protected]>
What Problem This Solves
The product and user model for scheduled work is "Automations", but the agent tool is literally named
cron, so the assistant sees and repeats "cron" in every conversation about scheduling. This is the tool-identity slice of RFC 0026 (Phase 1, PR A of the stack): rename the tool once, through a canonical identity, without breaking persisted config, saved transcripts, external callers, or the wire protocol.Why This Change Was Made
The tool name is a runtime identifier with behavioral consumers keyed on the exact string, so the rename ships as an identity migration in three commits:
f6c0e2d0869):AUTOMATIONS_TOOL_NAME+isAutomationsToolName()insrc/agents/tools/automations-tool-name.ts, with every exact-name consumer converted — factory descriptors, deferred-followup scheduler detection, successful-add counting, subagent/sandbox/local-model deny lists, mutation + replay-safety classification, trusted media set, catalog id, system-prompt tool order and tool-line map, delegation capability map, and MCP loopback probes. Constant still resolved to"cron", proving no scattered literals remained.bdbf8fa86ec): constant becomes"automations".TOOL_NAME_ALIASESgainscron -> automations(same shipped mechanism asbash -> exec) so persistedtoolsAllow/toolsDeny, tool groups, and creator allowlists keep matching with no doctor rewrite;isAutomationsToolName()andMUTATING_TOOL_NAMESaccept legacy names so saved transcripts keep their mutation/replay-safety classification.84592f0e928, addressing ClawSweeper P1 + Codex P1): inbound legacy calls are canonicalized at both external dispatch boundaries — MCP loopbacktools/callresolvescronto the published tool without re-advertising it intools/list, and gatewayPOST /tools/invokecanonicalizes before core-id checks and dispatch. This also surfaced and fixed a security regression:src/security/dangerous-tools.tskeyed the owner-only HTTP deny and control-plane lists on the literal"cron", so the renamed tool had silently lost default-deny protection on the invoke surface; the lists now use the canonical constant and thegateway.tools.allowun-deny filter normalizes both sides so legacy allow entries still lift it. Voice high-impact confirmation and MCP serve allowlists follow the canonical name.User Impact
The scheduler tool appears as
automationsin the tool list, transcripts, permission prompts, and tool-call UI. Existing configs (toolsAllow: ["cron"],gateway.tools.allow: ["cron"]), persisted jobs with legacy creator allowlists, saved transcripts, and external MCP//tools/invoke callers that still sendcronall keep working. Gateway RPC (cron.*), config keys, schedule{kind:"cron"}, and state paths are untouched.Evidence
Live behavior proof (source-run gateway, isolated
OPENCLAW_STATE_DIR, port 19777, token auth; token redacted):Phase 1 — no
gateway.tools.allow(default deny must hold for both names):Phase 2 — legacy-spelled
gateway.tools.allow: ["cron"](must lift the deny for the renamed tool):Focused test runs (local, trusted checkout), all green:
tools-invoke-http.cron-regression.test.ts+tools-invoke-http.test.ts+tool-resolution.test.ts— 53 passed: default deny for both names, legacy allow lifts deny, non-owner protection, spawned-session deny inheritancemcp-http.test.ts— new tests: legacycrontools/call resolves toautomations; still rejected when the tool isn't exposedtool-policy,tool-mutation,cron-toolsuites incl. creator-cap — legacy allow/deny matching, replay classification, creator allowlist normalizationrun.tools-allow,service.jobs,store,openclaw-tools.session-status— 218 tests pass unchanged, proving persisted legacy job payloads flow through the aliasPre-existing failures on clean
main(proven via stash, unrelated):agent-tools.policy.test.ts(#47487 case) and the timing-sensitivemcp-http.test.ts"withdraws a closing runtime" race.Reviews: Codex autoreview (gpt-5.4) P1 and ClawSweeper P1 both addressed by
84592f0e928(owner decision taken: preserve inbound compatibility). Full suite/typecheck fan-out on hosted CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01WhJ8EiMXue6ADLmHfb7FL6
Combined end-to-end verification (dev gateway)
All five stack PRs were merged into one integration build over current
mainand run side-by-side on an isolated dev gateway (:19001, own state dir) against real prod-synced state (post-2026.7.2-beta.5 doctor migration). Production stayed untouched on:18789. RFC 0026 accepted and merged: https://github.com/openclaw/rfcs/blob/main/rfcs/0026-automations-terminology.mdtools=count=20 sample=agents_list,automations,edit,exec,...— nocrontool in the model-facing schema.automationsto create a one-shot job; the run executed (status: ok,summary: "ping"), and its sessionKeyagent:lobster:cron:<jobId>:run:<uuid>retains the internalcron:key contract.POST /tools/invoke:automationsstays default-denied (Tool not available: automations); the legacy namecroncanonicalizes before the deny check and returns the same canonical-name error — the alias cannot bypass the owner-only gate.Stack: cron -> automations rename (RFC 0026)
Landing order: A + B together, then D, then E; C is independent.
Combined-payload upgrade proof (Crabbox, 2026-07-30)
Live user-path upgrade on a Blacksmith Testbox (Linux x64, Node 24), using the combined integration branch
omarshahine/openclawautomations-e2e-v2(all five stack PRs merged onto currentmain, heada00f8348):npm install -g openclaw@latest(2026.7.1-2), gateway up on :19801, two legacy jobs (daily-report,morning-wake) created through the releasedopenclaw cron addgateway-RPC path.scripts/package-openclaw-for-docker.mjs(package tarball integrity check green),npm install -gover the released install →OpenClaw 2026.7.2 (a00f834).openclaw automations list --all;openclaw cron list --alloutput identical (token parity); renamed help (Usage: openclaw cron|automations, "Manage automations (via Gateway)");openclaw automations add post-upgrade-proofround-trips and appears under thecrontoken;openclaw doctorcompletes with no rename-related findings."gateway": { "tools": { "allow": ["cron"] } }./tools/invokeon the upgraded gateway returnedok:truefor both{"tool":"cron","action":"status"}(permanent inbound alias) and{"tool":"automations","action":"list"}(legacy allow-list entry governs the renamed tool) — no config migration required.