From 23f4cd8459bcc254b4f6f10456f5a12a3eb4faaa Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 8 Apr 2026 22:26:05 -0700 Subject: [PATCH] Skip update prompts for source builds (#17186) Addresses #17166 Problem: Source builds report version 0.0.0, so the TUI update path can treat any released Codex version as upgradeable and show startup or popup prompts. Solution: Skip both TUI update prompt entry points when the running CLI version is the source-build sentinel 0.0.0. --- codex-rs/tui/src/updates.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/codex-rs/tui/src/updates.rs b/codex-rs/tui/src/updates.rs index 1edd871d0..8a4b65955 100644 --- a/codex-rs/tui/src/updates.rs +++ b/codex-rs/tui/src/updates.rs @@ -15,7 +15,7 @@ use std::path::PathBuf; use crate::version::CODEX_CLI_VERSION; pub fn get_upgrade_version(config: &Config) -> Option { - if !config.check_for_update_on_startup { + if !config.check_for_update_on_startup || is_source_build_version(CODEX_CLI_VERSION) { return None; } @@ -137,7 +137,7 @@ fn extract_version_from_latest_tag(latest_tag_name: &str) -> anyhow::Result Option { - if !config.check_for_update_on_startup { + if !config.check_for_update_on_startup || is_source_build_version(CODEX_CLI_VERSION) { return None; } @@ -177,6 +177,10 @@ fn parse_version(v: &str) -> Option<(u64, u64, u64)> { Some((maj, min, pat)) } +fn is_source_build_version(version: &str) -> bool { + parse_version(version) == Some((0, 0, 0)) +} + #[cfg(test)] mod tests { use super::*;