Skip to content

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

feat(web_chat): add journal shadow for web chat sessions

Steven Enamakel618c2c442a26
diff --git a/crates/openhuman-core/src/web_chat/journal_shadow.rs b/crates/openhuman-core/src/web_chat/journal_shadow.rs
index e2e5a5a449..84ce07e64e 100644
--- a/crates/openhuman-core/src/web_chat/journal_shadow.rs
+++ b/crates/openhuman-core/src/web_chat/journal_shadow.rs
@@ -107,7 +107,7 @@ pub(super) async fn shadow_compare_journal_projection(
live_spans: &[tinyagents_harness::observability::trace_export::TraceSpan],
) -> Option<Vec<tinyagents_harness::observability::AgentObservation>> {
let Some(journal_run_id) =
- crate::agent::tinyagents::journal::take_request_journal_run(request_id)
+ crate::agent::tinyagents::journal::take_request_journal_run(ctx, request_id)
else {
log::debug!(
"[agent-tracing][journal-shadow] no journal run registered request_id={}",
diff --git a/crates/openhuman-core/src/web_chat/schemas.rs b/crates/openhuman-core/src/web_chat/schemas.rs
index 31a4edee40..06bbc82ca8 100644
--- a/crates/openhuman-core/src/web_chat/schemas.rs
+++ b/crates/openhuman-core/src/web_chat/schemas.rs
@@ -160,6 +160,7 @@ fn handle_chat(ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture
let p = deserialize_params::<WebChatParams>(params)?;
// Recorded before the turn starts so it reads the new choice.
crate::agent::tinyagents::apply_requested_effort(
+ &ctx,
&p.thread_id,
p.reasoning_effort.as_deref(),
)?;