mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
fix: main (#26176)
This commit is contained in:
2 files changed
+5
-5
No files matched your search
@@ -3940,7 +3940,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_id() {
|
|||||||
.await
|
.await
|
||||||
.expect("root thread should start");
|
.expect("root thread should start");
|
||||||
session.services.agent_control = manager.agent_control();
|
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_path = AgentPath::try_from("/root/worker").expect("agent path");
|
||||||
let child_thread_id = session
|
let child_thread_id = session
|
||||||
@@ -3965,7 +3965,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_id() {
|
|||||||
.await
|
.await
|
||||||
.expect("worker spawn should succeed")
|
.expect("worker spawn should succeed")
|
||||||
.thread_id;
|
.thread_id;
|
||||||
session.conversation_id = child_thread_id;
|
session.thread_id = child_thread_id;
|
||||||
turn.session_source = SessionSource::SubAgent(SubAgentSource::ThreadSpawn {
|
turn.session_source = SessionSource::SubAgent(SubAgentSource::ThreadSpawn {
|
||||||
parent_thread_id: root.thread_id,
|
parent_thread_id: root.thread_id,
|
||||||
depth: 1,
|
depth: 1,
|
||||||
@@ -4008,7 +4008,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_task_name() {
|
|||||||
.await
|
.await
|
||||||
.expect("root thread should start");
|
.expect("root thread should start");
|
||||||
session.services.agent_control = manager.agent_control();
|
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_path = AgentPath::try_from("/root/worker").expect("agent path");
|
||||||
let child_thread_id = session
|
let child_thread_id = session
|
||||||
@@ -4033,7 +4033,7 @@ async fn multi_agent_v2_close_agent_rejects_self_target_by_task_name() {
|
|||||||
.await
|
.await
|
||||||
.expect("worker spawn should succeed")
|
.expect("worker spawn should succeed")
|
||||||
.thread_id;
|
.thread_id;
|
||||||
session.conversation_id = child_thread_id;
|
session.thread_id = child_thread_id;
|
||||||
turn.session_source = SessionSource::SubAgent(SubAgentSource::ThreadSpawn {
|
turn.session_source = SessionSource::SubAgent(SubAgentSource::ThreadSpawn {
|
||||||
parent_thread_id: root.thread_id,
|
parent_thread_id: root.thread_id,
|
||||||
depth: 1,
|
depth: 1,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ async fn handle_close_agent(
|
|||||||
"root is not a spawned agent".to_string(),
|
"root is not a spawned agent".to_string(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if agent_id == session.conversation_id {
|
if agent_id == session.thread_id {
|
||||||
return Err(FunctionCallError::RespondToModel(
|
return Err(FunctionCallError::RespondToModel(
|
||||||
"an agent cannot close itself; return your result and let the parent close you if needed"
|
"an agent cannot close itself; return your result and let the parent close you if needed"
|
||||||
.to_string(),
|
.to_string(),
|
||||||
|
|||||||
Reference in new issue
Block a user