Hmbown/CodeWhale · error · anyhow::Error
Trigger message must not be empty
Error message
Trigger message must not be empty
What it means
create_trigger rejects a message that trims to empty. The trimmed message is stored and delivered when the trigger fires, so blank strings are refused up front, after the fire_at check.
Source
Thrown at crates/tui/src/automation_manager.rs:1336
}
}
Ok(pending)
}
// ── Delayed-trigger storage methods ──────────────────────────────────
/// Persist a new delayed trigger and return the record.
pub fn create_trigger(&self, req: CreateDelayedTriggerRequest) -> Result<DelayedTriggerRecord> {
let now = Utc::now();
if req.fire_at <= now {
bail!(
"fire_at must be in the future (got {}, now is {})",
req.fire_at.to_rfc3339(),
now.to_rfc3339()
);
}
if req.message.trim().is_empty() {
bail!("Trigger message must not be empty");
}
let record = DelayedTriggerRecord {
schema_version: CURRENT_TRIGGER_SCHEMA_VERSION,
trigger_id: format!("trig_{}", Uuid::new_v4().simple()),
fire_at: req.fire_at,
message: req.message.trim().to_string(),
workspace: req.workspace,
owner_session_id: req.owner_session_id,
status: DelayedTriggerStatus::Pending,
created_at: now,
fired_at: None,
task_id: None,
thread_id: None,
error: None,
parent_trigger_id: req.parent_trigger_id,
};
self.save_trigger(&record)?;
Ok(record)View on GitHub (pinned to 0c42157ee5)
Solutions
- Provide a non-empty message describing what the trigger should do
- Validate trim-ness before submitting
- Default templated messages to a descriptive fallback string
Example fix
// before
let req = CreateDelayedTriggerRequest { fire_at, message: " ".to_string(), .. };
// after
let req = CreateDelayedTriggerRequest { fire_at, message: "Run the nightly backup now".to_string(), .. }; Defensive patterns
Strategy: validation
Validate before calling
fn trigger_message_ok(msg: &str) -> bool { !msg.trim().is_empty() } Type guard
fn is_non_blank(s: &str) -> bool { !s.trim().is_empty() } Prevention
- Require visible text for the trigger message in the UI before submit
- Give templated messages a descriptive fallback value
- Validate trim-ness before calling create_trigger so the fire_at check is not wasted
When it happens
Trigger: CreateDelayedTriggerRequest { message: String::new(), fire_at: future } or message: " "; templated messages that render to only whitespace.
Common situations: UIs submitting unvalidated textarea content; templates with empty variables; API scripts defaulting the message to an empty string.
Related errors
- Automation name cannot be empty
- Automation prompt cannot be empty
- fire_at must be in the future (got {}, now is {})
- context_window must be greater than 0
- custom provider '{provider_id}' must set [providers.{provide
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/54d4bffa648b4ff3.
Report an issue: GitHub.