diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 69e524a8ab..2d31961b52 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -139,6 +139,7 @@ use codex_protocol::protocol::AgentReasoningEvent; use codex_protocol::protocol::AgentReasoningRawContentDeltaEvent; #[cfg(test)] use codex_protocol::protocol::AgentReasoningRawContentEvent; +use codex_protocol::protocol::AgentSpawnMode; use codex_protocol::protocol::AgentStatus; use codex_protocol::protocol::ApplyPatchApprovalRequestEvent; #[cfg(test)] @@ -3663,9 +3664,12 @@ impl ChatWidget { .as_ref() .and_then(|metadata| metadata.agent_role.clone()), prompt: prompt.unwrap_or_default(), - spawn_mode: codex_protocol::protocol::AgentSpawnMode::Spawn, model: String::new(), reasoning_effort: ReasoningEffortConfig::Medium, + // Thread history items do not carry spawn_mode yet, so the + // replay path must choose an explicit fallback for reconstructed + // spawn rows. Plain spawn is the least surprising default. + spawn_mode: AgentSpawnMode::Spawn, status: first_receiver .as_ref() .and_then(|thread_id| agents_states.get(&thread_id.to_string()))