tinyhumansai/openhuman · error

delivery.channel is required for announce mode

Error message

delivery.channel is required for announce mode

What it means

A cron job configured with delivery mode `announce` (explicit channel-targeted output) has no `delivery.channel` value. The scheduler refuses to guess where to announce; the guard fires at dispatch time before the job output is delivered anywhere.

Source

Thrown at src/openhuman/cron/scheduler.rs:1345

                    job_id = %job.id,
                    source = %source,
                    "[cron] publishing ProactiveMessageRequested event"
                );
                BUS.publish(DomainEvent::ProactiveMessageRequested {
                    source,
                    message: output.to_string(),
                    job_name: job.name.clone(),
                });
            }
        }

        // Announce delivery — the cron job specifies the exact channel
        // and target. Used for explicit channel-targeted output.
        "announce" if deliver_to_chat => {
            let channel = delivery
                .channel
                .as_deref()
                .ok_or_else(|| anyhow::anyhow!("delivery.channel is required for announce mode"))?;
            let target = delivery
                .to
                .as_deref()
                .ok_or_else(|| anyhow::anyhow!("delivery.to is required for announce mode"))?;

            tracing::debug!(
                job_id = %job.id,
                channel = %channel,
                target = %target,
                "[cron] publishing CronDeliveryRequested event"
            );
            BUS.publish(DomainEvent::CronDeliveryRequested {
                job_id: job.id.clone(),
                channel: channel.to_string(),
                target: target.to_string(),
                output: output.to_string(),
            });
        }

View on GitHub (pinned to 7491200858)

Solutions

  1. Add a channel identifier to the job's delivery.channel field
  2. Or switch the delivery mode to one that does not require an explicit channel
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/cron/scheduler.rs:1345 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/24e2b0238c76a96c. Report an issue: GitHub.