diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 3c3fef0607..35a3535d89 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -897,7 +897,7 @@ impl Session { async fn new_turn_from_configuration( &self, - agent_id: &str, + agent_id: &AgentId, sub_id: String, session_configuration: SessionConfiguration, final_output_json_schema: Option>, @@ -936,7 +936,7 @@ impl Session { per_turn_config, model_family, self.conversation_id, - agent_id.to_string(), + agent_id.clone(), sub_id, ); if let Some(final_schema) = final_output_json_schema { @@ -1760,7 +1760,7 @@ mod handlers { pub async fn override_turn_context( sess: &Session, - agent_id: &str, + agent_id: &AgentId, sub_id: String, updates: SessionSettingsUpdate, ) { @@ -1778,7 +1778,7 @@ mod handlers { pub async fn user_input_or_turn( sess: &Arc, - agent_id: &str, + agent_id: &AgentId, sub_id: String, op: Op, previous_context: &mut Option>, @@ -1835,7 +1835,7 @@ mod handlers { pub async fn run_user_shell_command( sess: &Arc, - agent_id: &str, + agent_id: &AgentId, sub_id: String, command: String, previous_context: &mut Option>, @@ -1914,7 +1914,7 @@ mod handlers { pub async fn add_to_history( sess: &Arc, - agent_id: &str, + agent_id: &AgentId, config: &Arc, text: String, ) { @@ -1929,7 +1929,7 @@ mod handlers { pub async fn get_history_entry_request( sess: &Arc, - agent_id: &str, + agent_id: &AgentId, config: &Arc, sub_id: String, offset: usize, @@ -1967,7 +1967,7 @@ mod handlers { pub async fn list_mcp_tools( sess: &Session, - agent_id: &str, + agent_id: &AgentId, config: &Arc, sub_id: String, ) { @@ -2007,7 +2007,7 @@ mod handlers { pub async fn list_skills( sess: &Session, - agent_id: &str, + agent_id: &AgentId, sub_id: String, cwds: Vec, force_reload: bool, @@ -2105,7 +2105,7 @@ mod handlers { pub async fn review( sess: &Arc, - agent_id: &str, + agent_id: &AgentId, config: &Arc, sub_id: String, review_request: ReviewRequest, diff --git a/codex-rs/core/src/tasks/mod.rs b/codex-rs/core/src/tasks/mod.rs index b5aaf29999..2e2b0e7ac4 100644 --- a/codex-rs/core/src/tasks/mod.rs +++ b/codex-rs/core/src/tasks/mod.rs @@ -8,14 +8,6 @@ mod user_shell; use std::sync::Arc; use std::time::Duration; -use async_trait::async_trait; -use tokio::select; -use tokio::sync::Notify; -use tokio_util::sync::CancellationToken; -use tokio_util::task::AbortOnDropHandle; -use tracing::trace; -use tracing::warn; - use crate::AuthManager; use crate::codex::Session; use crate::codex::TurnContext; @@ -27,7 +19,15 @@ use crate::protocol::TurnAbortedEvent; use crate::state::ActiveTurn; use crate::state::RunningTask; use crate::state::TaskKind; +use async_trait::async_trait; +use codex_protocol::protocol::AgentId; use codex_protocol::user_input::UserInput; +use tokio::select; +use tokio::sync::Notify; +use tokio_util::sync::CancellationToken; +use tokio_util::task::AbortOnDropHandle; +use tracing::trace; +use tracing::warn; pub(crate) use compact::CompactTask; pub(crate) use ghost_snapshot::GhostSnapshotTask;