zeroclaw-labs/zeroclaw · error · anyhow::Error
Cron job ' ': shell_output_format is owned by config.toml…
Error message
Cron job '{job_id}': shell_output_format is owned by config.toml for a declarative job, not the database What it means
update_job_inner refuses to persist shell_output_format on a declarative (config.toml-owned) cron job. Declarative jobs derive all of their fields from config.toml at load time, so a database-stored value would either be overwritten by config or create a second source of truth; the gateway API already rejects this case and the store enforces the same boundary for every caller of update_job.
Solutions
- Set shell_output_format in config.toml for the declarative job and restart; it is not database-editable.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/zeroclaw-runtime/src/cron/store.rs:542 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/6b8f4d63045918f0.
Report an issue: GitHub.
Appendix: source
Thrown at crates/zeroclaw-runtime/src/cron/store.rs:542
// Empty list means "clear the allowlist" (all tools available),
// not "allow zero tools".
if allowed_tools.is_empty() {
job.allowed_tools = None;
} else {
job.allowed_tools = Some(allowed_tools);
}
}
if let Some(uses_memory) = patch.uses_memory {
job.uses_memory = uses_memory;
}
if let Some(shell_output_format) = patch.shell_output_format {
// Config-owned (declarative) and non-shell (agent) jobs never store
// this field: the gateway API already rejects both cases, but this
// is the core boundary every caller of `update_job` goes through,
// so it must reject them too rather than silently ignoring or
// persisting a value execution never consumes.
if job.source == "declarative" {
anyhow::bail!(
"Cron job '{job_id}': shell_output_format is owned by config.toml for a \
declarative job, not the database"
);
}
if job.job_type != JobType::Shell {
let job_type: &str = job.job_type.into();
anyhow::bail!(
"Cron job '{job_id}': shell_output_format is shell-only and cannot be set on a '{job_type}' job"
);
}
job.shell_output_format = shell_output_format;
}
if schedule_changed {
job.next_run = next_run_for_schedule(&job.schedule, Utc::now())?;
}
with_initialized_connection(config, |conn| {View on GitHub (pinned to 88bb9c8533)