tinyhumansai/openhuman · error

flow-type cron jobs are managed by the Workflows feature and

Error message

flow-type cron jobs are managed by the Workflows feature and cannot be created via cron_add

What it means

cron_add attempted to create a job whose derived JobType is Flow. Flow-type rows are owned by the Workflows feature (created internally by flows_set_enabled), so the cron tool refuses them by design. The arm is documented as practically unreachable via normal argument derivation — reaching it means an internal caller misrouted a flow job.

Source

Thrown at src/openhuman/cron/tools/add.rs:363

                cron::add_agent_job(
                    &self.config,
                    name,
                    schedule,
                    prompt,
                    session_target,
                    model,
                    delivery,
                    delete_after_run,
                )
            }
            // `job_type` above is derived only from `Some("agent")`/`Some("shell")`/
            // the `prompt`-presence heuristic, so this arm is unreachable in
            // practice — `JobType::Flow` rows are created internally by
            // `flows::ops::flows_set_enabled` (via `cron::add_flow_schedule_job`),
            // never through this agent-facing tool. Kept as an explicit error
            // (not `unreachable!()`) so a future change to the heuristic above
            // fails loudly with a clear message instead of panicking.
            JobType::Flow => Err(anyhow::anyhow!(
                "flow-type cron jobs are managed by the Workflows feature and cannot be \
                 created via cron_add"
            )),
        };

        match result {
            Ok(job) => {
                let payload = json!({
                    "id": job.id,
                    "name": job.name,
                    "job_type": job.job_type,
                    "schedule": job.schedule,
                    "next_run": job.next_run,
                    "enabled": job.enabled
                });
                let mut tr = ToolResult::success(serde_json::to_string_pretty(&payload)?);
                if options.prefer_markdown {
                    let md = format!(

View on GitHub (pinned to 7491200858)

Solutions

  1. Create or enable workflow-triggered schedules through the Workflows/flows feature instead of cron_add
  2. Do not attempt to inject flow jobs through the cron tool surface
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/cron/tools/add.rs:363 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/b51dc04349017874. Report an issue: GitHub.