diff --git a/codex-rs/core/src/agent/control.rs b/codex-rs/core/src/agent/control.rs index 404f08b4b8..17423a910f 100644 --- a/codex-rs/core/src/agent/control.rs +++ b/codex-rs/core/src/agent/control.rs @@ -1203,13 +1203,6 @@ impl AgentControl { self.watchdogs.register(registration).await } - pub(crate) async fn unregister_watchdog( - &self, - target_thread_id: ThreadId, - ) -> Option { - self.watchdogs.unregister(target_thread_id).await - } - pub(crate) async fn unregister_watchdogs_for_owner( &self, owner_thread_id: ThreadId, diff --git a/codex-rs/core/src/agent/role.rs b/codex-rs/core/src/agent/role.rs index cde3e3c064..4a3ac5b7ff 100644 --- a/codex-rs/core/src/agent/role.rs +++ b/codex-rs/core/src/agent/role.rs @@ -7,7 +7,6 @@ //! which role to use; the multi-agent tool handler owns that orchestration. use crate::config::AgentRoleConfig; -use crate::config::AgentRoleSpawnMode; use crate::config::Config; use crate::config::ConfigOverrides; use crate::config::agent_roles::parse_agent_role_file_contents; @@ -28,16 +27,6 @@ use toml::Value as TomlValue; pub const DEFAULT_ROLE_NAME: &str = "default"; const AGENT_TYPE_UNAVAILABLE_ERROR: &str = "agent type is currently not available"; -pub(crate) fn default_spawn_mode_for_role( - config: &Config, - role_name: Option<&str>, -) -> AgentRoleSpawnMode { - let role_name = role_name.unwrap_or(DEFAULT_ROLE_NAME); - resolve_role_config(config, role_name) - .and_then(|role| role.spawn_mode) - .unwrap_or_default() -} - pub(crate) fn watchdog_interval_for_role(config: &Config, role_name: Option<&str>) -> Option { let role_name = role_name.unwrap_or(DEFAULT_ROLE_NAME); resolve_role_config(config, role_name).and_then(|role| role.watchdog_interval_s) diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 843d015b9d..79e4c7d267 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -2191,26 +2191,6 @@ impl Session { self.active_turn.lock().await.is_some() } - pub(crate) async fn parent_thread_id(&self) -> Option { - let state = self.state.lock().await; - match &state.session_configuration.session_source { - SessionSource::SubAgent(SubAgentSource::ThreadSpawn { - parent_thread_id, .. - }) => Some(*parent_thread_id), - _ => None, - } - } - - pub(crate) fn mark_turn_used_agent_send_input(&self) { - self.turn_used_agent_send_input - .store(true, Ordering::Release); - } - - pub(crate) fn reset_turn_agent_send_input_flag(&self) { - self.turn_used_agent_send_input - .store(false, Ordering::Release); - } - pub(crate) fn snapshot_agent_send_input_on_turn_complete(&self) { let used_agent_send_input = self .turn_used_agent_send_input diff --git a/codex-rs/core/src/tasks/mod.rs b/codex-rs/core/src/tasks/mod.rs index 42f7b77863..e558c8f9c1 100644 --- a/codex-rs/core/src/tasks/mod.rs +++ b/codex-rs/core/src/tasks/mod.rs @@ -30,7 +30,6 @@ use crate::hook_runtime::record_additional_contexts; use crate::hook_runtime::record_pending_input; use crate::models_manager::manager::ModelsManager; use crate::protocol::EventMsg; -use crate::protocol::TokenUsage; use crate::protocol::TurnAbortReason; use crate::protocol::TurnAbortedEvent; use crate::protocol::TurnCompleteEvent; @@ -417,20 +416,6 @@ impl Session { self.send_event(turn_context.as_ref(), event).await; } - async fn register_new_active_task( - &self, - task: RunningTask, - token_usage_at_turn_start: TokenUsage, - ) { - self.reset_turn_agent_send_input_flag(); - let mut active = self.active_turn.lock().await; - let mut turn = ActiveTurn::default(); - let mut turn_state = turn.turn_state.lock().await; - turn_state.token_usage_at_turn_start = token_usage_at_turn_start; - drop(turn_state); - turn.add_task(task); - *active = Some(turn); - } async fn take_active_turn(&self) -> Option { let mut active = self.active_turn.lock().await; active.take() diff --git a/codex-rs/core/src/tools/handlers/multi_agents.rs b/codex-rs/core/src/tools/handlers/multi_agents.rs index 38affed9b3..54c3cdba58 100644 --- a/codex-rs/core/src/tools/handlers/multi_agents.rs +++ b/codex-rs/core/src/tools/handlers/multi_agents.rs @@ -43,21 +43,6 @@ pub(crate) fn parse_agent_id_target(target: &str) -> Result, -) -> Result, FunctionCallError> { - if targets.is_empty() { - return Err(FunctionCallError::RespondToModel( - "agent ids must be non-empty".to_string(), - )); - } - - targets - .into_iter() - .map(|target| parse_agent_id_target(&target)) - .collect() -} - pub(crate) use close_agent::Handler as CloseAgentHandler; pub(crate) use compact_parent_context::Handler as CompactParentContextHandler; pub(crate) use list_agents::Handler as ListAgentsHandler; diff --git a/codex-rs/core/src/tools/handlers/multi_agents/compact_parent_context.rs b/codex-rs/core/src/tools/handlers/multi_agents/compact_parent_context.rs index 8468023ad8..79a3020102 100644 --- a/codex-rs/core/src/tools/handlers/multi_agents/compact_parent_context.rs +++ b/codex-rs/core/src/tools/handlers/multi_agents/compact_parent_context.rs @@ -36,8 +36,10 @@ impl ToolHandler for Handler { #[derive(Debug, Deserialize)] struct CompactParentContextArgs { - reason: Option, - evidence: Option, + #[serde(rename = "reason")] + _reason: Option, + #[serde(rename = "evidence")] + _evidence: Option, } #[derive(Debug, Serialize)] diff --git a/codex-rs/core/src/tools/handlers/multi_agents/spawn.rs b/codex-rs/core/src/tools/handlers/multi_agents/spawn.rs index 5fe7cca0b0..14632b0165 100644 --- a/codex-rs/core/src/tools/handlers/multi_agents/spawn.rs +++ b/codex-rs/core/src/tools/handlers/multi_agents/spawn.rs @@ -283,7 +283,8 @@ impl ToolHandler for Handler { struct SpawnAgentArgs { message: Option, items: Option>, - task_name: Option, + #[serde(rename = "task_name")] + _task_name: Option, agent_type: Option, model: Option, model_fallback_list: Option>, diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index 7d7915e3ae..3e8336307d 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -985,7 +985,7 @@ mod inbox_feature_tests { let stage = spec.stage; assert!(matches!(stage, Stage::Experimental { .. })); - assert_eq!(stage.experimental_menu_name(), Some("Smart Approvals")); + assert_eq!(stage.experimental_menu_name(), Some("Guardian Approvals")); assert_eq!( stage.experimental_menu_description().map(str::to_owned), Some(