From 0dcb28dec8634c4c652ced2c7984abd61dc4445a Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 2 Feb 2026 13:34:55 -0800 Subject: [PATCH 1/2] Fixed sandbox mode inconsistency if untrusted is selected This PR addresses #10395 When a user is asked to pick the trust level of a project, the code currently reloads the config if they select "trusted". It doesn't reload the config in the "untrusted" case but should. This causes the sandbox mode to be reported incorrectly in `/status` during the first run (it's displayed as `read-only` even though it acts as though it's `workspace-write`). --- codex-rs/tui/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index dc29030434a..7e25b6644b8 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -494,12 +494,9 @@ async fn run_ratatui_app( exit_reason: ExitReason::UserRequested, }); } - // if the user acknowledged windows or made an explicit decision ato trust the directory, reload the config accordingly - if onboarding_result - .directory_trust_decision - .map(|d| d == TrustDirectorySelection::Trust) - .unwrap_or(false) - { + // If the user made an explicit trust decision, reload config so current + // process state reflects what was persisted to config.toml. + if onboarding_result.directory_trust_decision.is_some() { load_config_or_exit( cli_kv_overrides.clone(), overrides.clone(), From d507cd04d07209478e989a2fb373499ed553cee2 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 2 Feb 2026 17:20:22 -0800 Subject: [PATCH 2/2] Fix lint --- codex-rs/tui/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 7e25b6644b8..862f93eacf6 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -114,7 +114,6 @@ mod wrapping; #[cfg(test)] pub mod test_backend; -use crate::onboarding::TrustDirectorySelection; use crate::onboarding::onboarding_screen::OnboardingScreenArgs; use crate::onboarding::onboarding_screen::run_onboarding_app; use crate::tui::Tui;