Skip to content

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

fix(runtime): scope team member memory identity

Steven Enamakel360a26617eee
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
index 349c921021..383531062e 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
@@ -219,7 +219,11 @@ async fn run_member_loop(
run_id: &str,
model_override: Option<String>,
) {
- let outcome = with_root_parent(config, "agent_team_runtime", "team", "teamrun", async {
+ // The member acts on memory as itself within the team: its node is
+ // `team:<team>/agent:<agent>`, so members share the team's node and
+ // never read each other's.
+ let identity = crate::memory::scope::MemoryIdentity::team_member(config, team_id, agent_id);
+ let member_turn = with_root_parent(config, "agent_team_runtime", "team", "teamrun", async {
drive_member(
config,
team_id,
@@ -230,7 +234,8 @@ async fn run_member_loop(
model_override,
)
.await
- })
+ });
+ let outcome = crate::memory::scope::within(identity, member_turn)
.await
// Flatten: outer Err = root-parent build failure, inner = drive_member result.
.unwrap_or_else(Err);