Skip daemon auto-start for Windows-mounted WSL homes (#50555)

## Why

The managed daemon writes an executable and Unix-style state beneath `CODEX_HOME`. Windows-mounted WSL filesystems (DrvFS/9p) do not reliably support the required permission semantics, which can cause startup to fail before the TUI opens.

## What changed

Detect WSL homes on 9p filesystems, checking an existing ancestor when `CODEX_HOME` does not yet exist. Keep the TUI in embedded mode instead of automatically starting the shared background server, and show a startup warning explaining the exclusion.

## Testing

Extend the daemon exclusion warning snapshot to cover the Windows-mounted WSL message.

GitOrigin-RevId: 995e6236d79d8190b0ab1e6b4761eeef3c068467
This commit is contained in:
Eric Traut
2026-10-03 07:05:36 +00:00
committed by copyberry
parent 55b6f282a8
commit 6b43e6fe1f
4 changed files with 44 additions and 0 deletions
+4
View File
@@ -431,6 +431,10 @@ fn daemon_exclusion_warning_snapshot() {
let cell = crate::history_cell::StartupWarningsCell::new(vec![
"Running without the shared background server: --strict-config requires embedded mode."
.into(),
format!(
"Running without the shared background server: {} requires embedded mode.",
daemon_startup::WSL_DRVFS_EXCLUSION
),
]);
let text = cell
.transcript_lines(/*width*/ 80)