Skip to content

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

fix(channels): scope transcript session to store agent id

Steven Enamakel9532c0c5098f
diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rs
index 12389fb363..5c9282f0c3 100644
--- a/crates/openhuman-core/src/channels/routes.rs
+++ b/crates/openhuman-core/src/channels/routes.rs
@@ -377,7 +377,10 @@ async fn durable_channel_history_len(
&store_agent_id,
&ctx.workspace_dir,
);
- let session = tinyagents_session::transcript::SessionRef::scoped(session_key, &agent_id);
+ // The runtime session addresses its transcript by the tenant-scoped store
+ // key (the session identity resolver's agent), not the bare definition id.
+ let session =
+ tinyagents_session::transcript::SessionRef::scoped(session_key, &store_agent_id);
let head = locator.head_generation(&session);
let Some(read) = locator.read_session_transcript(&head) else {
return 0;