Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: main (#26176)

jif4417e4c193bf
diff --git a/codex-rs/core/src/tools/handlers/multi_agents_tests.rs b/codex-rs/core/src/tools/handlers/multi_agents_tests.rs
index 868847414e..d32bd5dd62 100644
--- a/codex-rs/core/src/tools/handlers/multi_agents_tests.rs
+++ b/codex-rs/core/src/tools/handlers/multi_agents_tests.rs
@@ -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,
diff --git a/codex-rs/core/src/tools/handlers/multi_agents_v2/close_agent.rs b/codex-rs/core/src/tools/handlers/multi_agents_v2/close_agent.rs
index 756a1862bb..7b3f8d776e 100644
--- a/codex-rs/core/src/tools/handlers/multi_agents_v2/close_agent.rs
+++ b/codex-rs/core/src/tools/handlers/multi_agents_v2/close_agent.rs
@@ -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(),