From 3ae966edd8fdc194a0f7395c8cfcfc54b94c260b Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Tue, 27 Jan 2026 13:29:55 -0800 Subject: [PATCH] Clarify external editor env var message (#10030) ### Motivation - Improve UX by making it explicit that `VISUAL`/`EDITOR` must be set before launching Codex, not during a running session. ### Description - Update the external editor error text in `codex-rs/tui/src/app.rs` to: `"Cannot open external editor: set $VISUAL or $EDITOR before starting Codex."` and run `just fmt` to apply formatting. ### Testing - Ran `just fmt` successfully; attempted `cargo test -p codex-tui` but it failed due to network errors when fetching git dependencies (tests did not complete). ------ [Codex Task](https://chatgpt.com/codex/tasks/task_i_6972c2c984948329b1a37d5c5839aff3) --- codex-rs/tui/src/app.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 4e41a2a0d..87f232ed2 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -2268,8 +2268,9 @@ impl App { Err(external_editor::EditorError::MissingEditor) => { self.chat_widget .add_to_history(history_cell::new_error_event( - "Cannot open external editor: set $VISUAL or $EDITOR".to_string(), - )); + "Cannot open external editor: set $VISUAL or $EDITOR before starting Codex." + .to_string(), + )); self.reset_external_editor_state(tui); return; }