Skip to content

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

feat(web_chat): bind conversation identity before checkout

Steven Enamakeleb3ba571e3cc
diff --git a/crates/openhuman-core/src/web_chat/session.rs b/crates/openhuman-core/src/web_chat/session.rs
index 8e01747b03..a64814b82c 100644
--- a/crates/openhuman-core/src/web_chat/session.rs
+++ b/crates/openhuman-core/src/web_chat/session.rs
@@ -96,6 +96,12 @@ pub(super) fn build_session_agent(
thread_id
};
agent.set_agent_definition_name(format!("{target_agent_id}_{short_thread}"));
+ // Bind the conversation's durable identity here, not after
+ // checkout: everything downstream — resume, transcript binding,
+ // the `_meta` this session writes — is addressed by it, and a host
+ // that forgot to bind it would fall back to resuming whichever
+ // transcript for this agent happened to be newest.
+ agent.set_thread_id(Some(thread_id));
agent
})
.map_err(|e| e.to_string())