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
This commit is contained in:
Eric Traut
2026-09-22 03:20:27 +00:00
committed by copyberry
parent 5106a5234f
commit 75ec81c862
6 changed files with 10 additions and 50 deletions
+1 -1
View File
@@ -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\
+1 -1
View File
@@ -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,
+4 -7
View File
@@ -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,
@@ -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);
}
@@ -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
+4 -3
View File
@@ -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"))?;