Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(cron): handle missing core context in origin messages

Steven Enamakelae85b9409ec9
diff --git a/crates/openhuman-core/src/cron/scheduler/origin_context.rs b/crates/openhuman-core/src/cron/scheduler/origin_context.rs
index 9430df7857..ca25b30ed7 100644
--- a/crates/openhuman-core/src/cron/scheduler/origin_context.rs
+++ b/crates/openhuman-core/src/cron/scheduler/origin_context.rs
@@ -91,8 +91,12 @@ async fn origin_messages(
..
} => match validated_channel_session(ctx, config, channel, identity) {
Ok(Some((session_key, agent_id, tenant))) => {
+ let Some(core) = ctx.core() else {
+ tracing::warn!("[cron] channel origin has no resolved core context");
+ return Vec::new();
+ };
let locator = crate::agent::session_store::transcripts_or_files_in(
- ctx.core().expect("validated tenant has a core context"),
+ core,
&crate::agent::session_store::agent_key_for(&tenant, &agent_id),
&config.workspace_dir,
);