tinyhumansai/openhuman · error

delivery.to is required for announce mode

Error message

delivery.to is required for announce mode

What it means

A cron job with delivery mode `announce` has `delivery.channel` set but no `delivery.to` target — the recipient inside the channel is missing. Companion guard to the channel check; both must be present for announce mode, and the scheduler refuses to pick a default recipient.

Source

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

                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(),
            });
        }

        // No delivery configured — output is stored in last_output only.
        // The failure still reaches the alerts tab via the hoisted
        // `push_cron_alert` below.

View on GitHub (pinned to 7491200858)

Solutions

  1. Set delivery.to to the target recipient (chat/thread/user id) for announce delivery
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/cron/scheduler.rs:1349 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/0b35eab4bfe65eb7. Report an issue: GitHub.