Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3454c38dbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| settings_path: &PathBuf, | ||
| ) -> Result<AppSettings, String> { | ||
| let previous = app_settings.lock().await.clone(); | ||
| apply_default_codex_home_env(&settings, Some(&previous)); |
There was a problem hiding this comment.
Apply CODEX_HOME override after settings write succeeds
update_app_settings_core mutates process state via apply_default_codex_home_env before write_settings can fail. In any I/O failure case (e.g., permissions or disk-full), the call returns an error but CODEX_HOME has already been changed/cleared, so later Codex operations run with an environment that no longer matches persisted AppSettings. This introduces user-visible drift and can route reads/writes to the wrong home until restart.
Useful? React with 👍 / 👎.
No description provided.