Skip to content

fix: add cronJob tool access to the orchestrator #874

Description

@avoidwork

Summary

The cronJob tool is not accessible to the orchestrator or any agent that a user would naturally delegate to. Only security-audit and performance agents have it classified, meaning users cannot schedule, list, pause, resume, or trigger cron jobs through the main agent conversation.

Motivation

The cronJob tool is a built-in tool for managing scheduled cron jobs — create, list, update, pause, resume, run, remove. Users expect to be able to ask the main agent "schedule a daily backup at 2am" or "list my cron jobs." However, the orchestrator (the entry-point agent that receives user messages) does not have cronJob in its ORCHESTRATOR_TOOLS list, and no other agent type besides security-audit and performance has it in their classification.

This means the user-facing agent cannot manage cron jobs at all — a gap between the tool's existence and its accessibility.

Proposed Solution

Add cronJob to the orchestrator's tool set so the main agent can manage cron jobs directly.

File: src/tools/index.js

Add cronJob to the ORCHESTRATOR_TOOLS array (around line 148):

export const ORCHESTRATOR_TOOLS = [
  "clarify",
  "compactContext",
  "date",
  "memory",
  "process",
  "reflectionSessions",
  "sessionSearch",
  "webSearch",
  "webExtract",
  "scanAgents",
  "sampling",
  "createSkill",
  "cronJob",  // <-- add this
];

Also add cronJob to the TOOL_CLASSIFICATIONS for the orchestrator type:

cronJob: ["security-audit", "performance", "orchestrator"],

Alternatives Considered

  • Add to all agent types — too broad; not every agent needs cron management
  • Add only to coding agent — too narrow; cron management is a general-purpose capability
  • Add to orchestrator only — the orchestrator is the user-facing agent and the natural entry point for user requests

OpenSpec Note

This project uses OpenSpec for feature development. If this request is approved, I will:

  1. Run /opsx:propose to generate a full proposal with specs and tasks
  2. Iterate on the design before any code is written
  3. Follow the task-driven implementation workflow

Additional Context

  • cronJob requires network:outbound permission (already gated)
  • The tool is already fully implemented in src/tools/cron.js with 450+ lines of code
  • Only 2 agents currently have access: security-audit and performance
  • The orchestrator has 12 tools but none for schedule management

Audit Findings (for Issue #874)

  • src/tools/index.js:81cronJob classified only for ["security-audit", "performance"]. Missing "orchestrator".
  • src/tools/index.js:148-161ORCHESTRATOR_TOOLS array does not include "cronJob".
  • src/tools/cron.js:454 — Tool implementation is complete and functional; no changes needed to the tool itself.
  • README.md:503 — Tool is documented in the Built-in Tools table but agent access is not specified there.

Fix Steps

  1. Add cronJob to ORCHESTRATOR_TOOLS — Open src/tools/index.js and add "cronJob" to the ORCHESTRATOR_TOOLS array (line ~161).
  2. Add cronJob to TOOL_CLASSIFICATIONS — Add "orchestrator" to the cronJob classification array on line 81: cronJob: ["security-audit", "performance", "orchestrator"].
  3. Update README.md — Add orchestrator to the Built-in Tools table's agent access column for cronJob (if the table exists and tracks agent access).
  4. Write unit tests — Add tests verifying the orchestrator has access to cronJob in tests/unit/tools_cron.test.js or a new tests/unit/tools_orchestrator.test.js.
  5. Verify — Run npm run test, npm run lint, and npm run coverage to confirm no regressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedAn identifier for Madz to take action.bugSomething isn't workingin progress

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions