From 1e27028360c4afa647d756625932fb8d3b2ffadf Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sat, 11 Apr 2026 15:45:58 -0700 Subject: [PATCH] Clear /ps after /stop (#17416) Addresses #17311 Problem: `/stop` stops background terminals, but `/ps` can still show stale entries because the TUI process cache is cleared only after later exec end events arrive. Solution: Clear the TUI's tracked unified exec process list and footer immediately when `/stop` submits background terminal cleanup. --- codex-rs/tui/src/chatwidget.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 1e5ad3e56..fe8340452 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -7260,6 +7260,8 @@ impl ChatWidget { fn clean_background_terminals(&mut self) { self.submit_op(AppCommand::clean_background_terminals()); + self.unified_exec_processes.clear(); + self.sync_unified_exec_footer(); self.add_info_message( "Stopping all background terminals.".to_string(), /*hint*/ None,