From 75ec81c8623c0ca50b129de5a82521a23d37b726 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Tue, 22 Sep 2026 03:11:08 +0000 Subject: [PATCH] Enable automatic daemon startup by default (#47179) ## What changed Promote `daemon_auto_start` to stable and enable it by default for eligible interactive launches. Remove its entry from `/experimental`. ## Testing Update daemon startup, `--no-daemon`, and startup failure tests to exercise the default without explicitly enabling the feature. Disable daemon startup in unrelated TUI and path-safety test fixtures. GitOrigin-RevId: 107d71108b96d09431148d7d61f10c6381929e05 --- codex-rs/cli/tests/daemon_startup.rs | 2 +- codex-rs/cli/tests/doctor_path_safety.rs | 2 +- codex-rs/features/src/lib.rs | 11 ++++------ .../experimental_features_view_tests.rs | 21 ------------------- ...s_view__tests__daemon_auto_start_menu.snap | 17 --------------- codex-rs/tui/tests/suite/focus_palette.rs | 7 ++++--- 6 files changed, 10 insertions(+), 50 deletions(-) delete mode 100644 codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__experimental_features_view__tests__daemon_auto_start_menu.snap diff --git a/codex-rs/cli/tests/daemon_startup.rs b/codex-rs/cli/tests/daemon_startup.rs index 3073e1d127..6a235149f0 100644 --- a/codex-rs/cli/tests/daemon_startup.rs +++ b/codex-rs/cli/tests/daemon_startup.rs @@ -46,7 +46,7 @@ async fn daemon_startup(command: &str) -> Result<()> { fs::write( home.path().join("config.toml"), format!( - "model = \"gpt-5.6-terra\"\nfeatures.daemon_auto_start = true\n\ + "model = \"gpt-5.6-terra\"\n\ features.bedrock_setup_wizard = true\ncli_auth_credentials_store = \"file\"\n\ suppress_unstable_features_warning = true\nanalytics.enabled = false\n\ windows.sandbox = \"unelevated\"\n\ diff --git a/codex-rs/cli/tests/doctor_path_safety.rs b/codex-rs/cli/tests/doctor_path_safety.rs index c4bb01b2b9..c03c0d47c5 100644 --- a/codex-rs/cli/tests/doctor_path_safety.rs +++ b/codex-rs/cli/tests/doctor_path_safety.rs @@ -373,7 +373,7 @@ async fn interactive_tmux_startup_does_not_execute_workspace_helpers() -> Result ); let spawned = codex_utils_pty::spawn_pty_process( fixture.program.to_str().unwrap(), - &[], + &["--no-daemon".to_string()], &fixture.workspace, &env, /*arg0*/ &None, diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index 30318ae47b..9611edfa32 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -109,9 +109,10 @@ pub enum Feature { /// Store CLI auth in the encrypted local secrets backend when keyring storage is selected. SecretAuthStorage, - // Experimental /// Automatically start the shared local daemon for eligible interactive launches. DaemonAutoStart, + + // Experimental /// Send per-content-entry classifications in internal Responses metadata. ContentItemKinds, /// Record model-attempted tool calls in internal Responses metadata. @@ -937,12 +938,8 @@ pub const FEATURES: &[FeatureSpec] = &[ FeatureSpec { id: Feature::DaemonAutoStart, key: "daemon_auto_start", - stage: Stage::Experimental { - name: "Automatically start the background server", - menu_description: "Use the shared local server for new, resumed, and forked sessions. Takes effect next launch.", - announcement: "Automatic background server startup can now be enabled from /experimental.", - }, - default_enabled: false, + stage: Stage::Stable, + default_enabled: true, }, FeatureSpec { id: Feature::TranscriptV2, diff --git a/codex-rs/tui/src/bottom_pane/experimental_features_view_tests.rs b/codex-rs/tui/src/bottom_pane/experimental_features_view_tests.rs index c0385e440a..38110e6358 100644 --- a/codex-rs/tui/src/bottom_pane/experimental_features_view_tests.rs +++ b/codex-rs/tui/src/bottom_pane/experimental_features_view_tests.rs @@ -303,24 +303,3 @@ fn voice_discovery_requires_the_client_runtime() { ); } } - -#[test] -fn daemon_auto_start_menu_snapshot() { - let feature = Feature::DaemonAutoStart; - let stage = feature.stage(); - let (app_tx, _app_rx) = tokio::sync::mpsc::unbounded_channel(); - let view = ExperimentalFeaturesView::new( - vec![ExperimentalFeatureItem { - key: feature.key().to_string(), - name: stage.experimental_menu_name().unwrap().to_string(), - description: stage.experimental_menu_description().unwrap().to_string(), - enabled: feature.default_enabled(), - writable: true, - }], - ThreadId::new(), - /*catalog_rx*/ None, - AppEventSender::new(app_tx), - crate::keymap::RuntimeKeymap::defaults().list, - ); - snapshot_view("daemon_auto_start_menu", &view); -} diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__experimental_features_view__tests__daemon_auto_start_menu.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__experimental_features_view__tests__daemon_auto_start_menu.snap deleted file mode 100644 index 7532e9c198..0000000000 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__experimental_features_view__tests__daemon_auto_start_menu.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: tui/src/bottom_pane/experimental_features_view_tests.rs -expression: buffer_text(&buffer) ---- - - Experimental features - Checked features are configured on. Some experimental features take effect - only in new tasks or after restarting the Codex server. - - -› [ ] Automatically start the background server Use the shared local server for - new, resumed, and forked - sessions. Takes effect next - launch. - - - space toggle · enter save · esc save/close diff --git a/codex-rs/tui/tests/suite/focus_palette.rs b/codex-rs/tui/tests/suite/focus_palette.rs index 8342b9548c..eb410e2a4f 100644 --- a/codex-rs/tui/tests/suite/focus_palette.rs +++ b/codex-rs/tui/tests/suite/focus_palette.rs @@ -534,7 +534,8 @@ pub(super) fn write_test_config(codex_home: &Path, repo_root: &Path) -> Result<( let repo_root = repo_root.display(); let config = format!( "model = \"gpt-5.6-terra\"\nmodel_provider = \"openai\"\n\ - suppress_unstable_features_warning = true\nanalytics.enabled = false\n\n\ + suppress_unstable_features_warning = true\nanalytics.enabled = false\n\ + features.daemon_auto_start = false\n\n\ [projects.\"{repo_root}\"]\ntrust_level = \"trusted\"\n" ); std::fs::write(codex_home.join("config.toml"), config) @@ -556,7 +557,7 @@ fn no_daemon_skips_startup_and_discovery() -> Result<()> { let contents = std::fs::read_to_string(&config)?; std::fs::write( config, - format!("features.daemon_auto_start = true\n{contents}"), + contents.replace("features.daemon_auto_start = false\n", ""), )?; let socket_path = codex_app_server_client::app_server_control_socket_path(home.path())?; std::fs::create_dir_all(socket_path.as_path().parent().unwrap())?; @@ -604,7 +605,7 @@ fn auto_daemon_start_failure_exits_with_manual_fallback_hint() -> Result<()> { let contents = std::fs::read_to_string(&config)?; std::fs::write( config, - format!("features.daemon_auto_start = true\n{contents}"), + contents.replace("features.daemon_auto_start = false\n", ""), )?; // An incomplete selected package must fail without installing a replacement. std::fs::create_dir_all(home.path().join("packages/app-server-daemon/current"))?;