Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Fixed sandbox mode inconsistency if untrusted is selected (#10415)

Eric Traut8dd41e229b43
diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs
index dc29030434..862f93eacf 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;
@@ -494,12 +493,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(),