This commit is contained in:
jif
2026-06-03 16:47:34 +02:00
committed by GitHub
Unverified
parent 96d2d2f68c
commit 4417e4c193
2 changed files with 5 additions and 5 deletions
@@ -3940,7 +3940,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_id() {
.await
.expect("root thread should start");
session.services.agent_control = manager.agent_control();
session.conversation_id = root.thread_id;
session.thread_id = root.thread_id;
let child_path = AgentPath::try_from("/root/worker").expect("agent path");
let child_thread_id = session
@@ -3965,7 +3965,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_id() {
.await
.expect("worker spawn should succeed")
.thread_id;
session.conversation_id = child_thread_id;
session.thread_id = child_thread_id;
turn.session_source = SessionSource::SubAgent(SubAgentSource::ThreadSpawn {
parent_thread_id: root.thread_id,
depth: 1,
@@ -4008,7 +4008,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_task_name() {
.await
.expect("root thread should start");
session.services.agent_control = manager.agent_control();
session.conversation_id = root.thread_id;
session.thread_id = root.thread_id;
let child_path = AgentPath::try_from("/root/worker").expect("agent path");
let child_thread_id = session
@@ -4033,7 +4033,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_task_name() {
.await
.expect("worker spawn should succeed")
.thread_id;
session.conversation_id = child_thread_id;
session.thread_id = child_thread_id;
turn.session_source = SessionSource::SubAgent(SubAgentSource::ThreadSpawn {
parent_thread_id: root.thread_id,
depth: 1,
@@ -49,7 +49,7 @@ async fn handle_close_agent(
"root is not a spawned agent".to_string(),
));
}
if agent_id == session.conversation_id {
if agent_id == session.thread_id {
return Err(FunctionCallError::RespondToModel(
"an agent cannot close itself; return your result and let the parent close you if needed"
.to_string(),