core-agent-ide/codex-rs/tui/src
friel-openai ba463a9dc7
Preserve background terminals on interrupt and rename cleanup command to /stop (#14602)
### Motivation
- Interrupting a running turn (Ctrl+C / Esc) currently also terminates
long‑running background shells, which is surprising for workflows like
local dev servers or file watchers.
- The existing cleanup command name was confusing; callers expect an
explicit command to stop background terminals rather than a UI clear
action.
- Make background‑shell termination explicit and surface a clearer
command name while preserving backward compatibility.

### Description
- Renamed the background‑terminal cleanup slash command from `Clean`
(`/clean`) to `Stop` (`/stop`) and kept `clean` as an alias in the
command parsing/visibility layer, updated the user descriptions and
command popup wiring accordingly.
- Updated the unified‑exec footer text and snapshots to point to `/stop`
(and trimmed corresponding snapshot output to match the new label).
- Changed interrupt behavior so `Op::Interrupt` (Ctrl+C / Esc interrupt)
no longer closes or clears tracked unified exec / background terminal
processes in the TUI or core cleanup path; background shells are now
preserved after an interrupt.
- Updated protocol/docs to clarify that `turn/interrupt` (or
`Op::Interrupt`) interrupts the active turn but does not terminate
background terminals, and that `thread/backgroundTerminals/clean` is the
explicit API to stop those shells.
- Updated unit/integration tests and insta snapshots in the TUI and core
unified‑exec suites to reflect the new semantics and command name.

### Testing
- Ran formatting with `just fmt` in `codex-rs` (succeeded). 
- Ran `cargo test -p codex-protocol` (succeeded). 
- Attempted `cargo test -p codex-tui` but the build could not complete
in this environment due to a native build dependency that requires
`libcap` development headers (the `codex-linux-sandbox` vendored build
step); install `libcap-dev` / make `libcap.pc` available in
`PKG_CONFIG_PATH` to run the TUI test suite locally.
- Updated and accepted the affected `insta` snapshots for the TUI
changes so visual diffs reflect the new `/stop` wording and preserved
interrupt behavior.

------
[Codex
Task](https://chatgpt.com/codex/tasks/task_i_69b39c44b6dc8323bd133ae206310fae)
2026-03-15 22:17:25 -07:00
..
app Start TUI on embedded app server (#14512) 2026-03-13 12:04:41 -06:00
bin replace tui_markdown with a custom markdown renderer (#3396) 2025-09-10 12:13:53 -07:00
bottom_pane Preserve background terminals on interrupt and rename cleanup command to /stop (#14602) 2026-03-15 22:17:25 -07:00
chatwidget Preserve background terminals on interrupt and rename cleanup command to /stop (#14602) 2026-03-15 22:17:25 -07:00
exec_cell Handle orphan exec ends without clobbering active exploring cell (#12313) 2026-02-22 14:26:58 +00:00
notifications Added tui.notifications_method config option (#10043) 2026-01-28 12:00:32 -08:00
onboarding Renaming Team to Business plan during TUI onboarding (#13313) 2026-03-02 23:13:29 -08:00
public_widgets Persist text elements through TUI input and history (#9393) 2026-01-19 23:49:34 -08:00
render fix(tui): decode ANSI alpha-channel encoding in syntax themes (#13382) 2026-03-04 12:03:34 -08:00
snapshots render local file links from target paths (#13857) 2026-03-11 12:33:09 -07:00
status Use model catalog default for reasoning summary fallback (#12873) 2026-02-26 09:31:13 -08:00
streaming render local file links from target paths (#13857) 2026-03-11 12:33:09 -07:00
tui feat(tui): pace catch-up stream chunking with hysteresis (#10461) 2026-02-03 15:01:51 -08:00
additional_dirs.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
app.rs Add Smart Approvals guardian review across core, app-server, and TUI (#13860) 2026-03-13 15:27:00 -07:00
app_backtrack.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
app_event.rs Add Smart Approvals guardian review across core, app-server, and TUI (#13860) 2026-03-13 15:27:00 -07:00
app_event_sender.rs tui: switch to using tokio + EventStream for processing crossterm events (#2489) 2025-08-20 17:11:09 +00:00
ascii_animation.rs chore: remove model upgrade popup (#4332) 2025-09-27 13:25:09 -07:00
audio_device.rs Align TUI voice transcription audio with 4o ASR (#13030) 2026-02-27 18:22:48 +00:00
chatwidget.rs Preserve background terminals on interrupt and rename cleanup command to /stop (#14602) 2026-03-15 22:17:25 -07:00
cli.rs feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
clipboard_paste.rs Fixed TUI regression related to image paste in WSL (#9473) 2026-01-18 23:02:02 -08:00
clipboard_text.rs Slash copy osc52 wsl support (#13201) 2026-03-13 14:00:58 -07:00
collaboration_modes.rs Sync collaboration mode naming across Default prompt, tools, and TUI (#10666) 2026-02-04 23:03:28 -08:00
color.rs update composer + user message styling (#4240) 2025-09-26 16:35:56 -07:00
custom_terminal.rs tweaked /clear to support clear + new chat, also fix minor bug for macos terminal (#12520) 2026-02-23 09:11:05 -08:00
cwd_prompt.rs tui: exit session on Ctrl+C in cwd change prompt (#12040) 2026-02-17 14:48:12 -08:00
debug_config.rs Override local apps settings with requirements.toml settings (#14304) 2026-03-13 12:40:24 -07:00
diff_render.rs fix(tui): theme-aware diff backgrounds with fallback behavior (#13037) 2026-02-27 16:44:56 -07:00
exec_command.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
external_editor.rs feat: open prompt in configured external editor (#7606) 2025-12-22 15:12:23 -08:00
file_search.rs app-server: add fuzzy search sessions for streaming file search (#10268) 2026-02-12 10:49:44 -08:00
frames.rs Login flow polish (#3632) 2025-09-15 00:42:53 -07:00
get_git_diff.rs Show progress indicator for /diff command (#2245) 2025-08-15 15:32:41 -07:00
history_cell.rs Add Smart Approvals guardian review across core, app-server, and TUI (#13860) 2026-03-13 15:27:00 -07:00
insert_history.rs feat(tui) /clear (#12444) 2026-02-21 22:06:56 -08:00
key_hint.rs Add vim navigation keys to transcript pager (#7550) 2025-12-09 10:23:11 -08:00
lib.rs Start TUI on embedded app server (#14512) 2026-03-13 12:04:41 -06:00
line_truncation.rs fix: add ellipsis for truncated status indicator (#12540) 2026-02-23 11:45:46 -08:00
live_wrap.rs Stream model responses (#1810) 2025-08-05 04:23:22 +00:00
main.rs Start TUI on embedded app server (#14512) 2026-03-13 12:04:41 -06:00
markdown.rs render local file links from target paths (#13857) 2026-03-11 12:33:09 -07:00
markdown_render.rs render local file links from target paths (#13857) 2026-03-11 12:33:09 -07:00
markdown_render_tests.rs render local file links from target paths (#13857) 2026-03-11 12:33:09 -07:00
markdown_stream.rs render local file links from target paths (#13857) 2026-03-11 12:33:09 -07:00
mention_codec.rs chore: use @plugin instead of $plugin for plaintext mentions (#13921) 2026-03-08 01:36:39 +00:00
model_migration.rs fix(tui): preserve URL clickability across all TUI views (#12067) 2026-02-21 15:31:41 -08:00
multi_agents.rs Include spawn agent model metadata in app-server items (#14410) 2026-03-11 19:25:21 -07:00
oss_selection.rs chore: nuke chat/completions API (#10157) 2026-02-03 11:31:57 +00:00
pager_overlay.rs Add Smart Approvals guardian review across core, app-server, and TUI (#13860) 2026-03-13 15:27:00 -07:00
resume_picker.rs tui: sort resume picker by last updated time (#13654) 2026-03-05 18:23:44 -08:00
selection_list.rs splash screen (#8270) 2025-12-18 10:59:53 -08:00
session_log.rs feat(tui) /clear (#12444) 2026-02-21 22:06:56 -08:00
shimmer.rs tui: hardcode xterm palette, shimmer blends between fg and bg (#4957) 2025-10-08 20:23:13 +00:00
skills_helpers.rs feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
slash_command.rs Preserve background terminals on interrupt and rename cleanup command to /stop (#14602) 2026-03-15 22:17:25 -07:00
status_indicator_widget.rs fix: show command running in background terminal in details under status indicator (#12549) 2026-02-23 21:04:24 +00:00
style.rs Make plan highlight use popup grey background (#10253) 2026-01-30 12:39:15 -08:00
terminal_palette.rs feat(tui): add theme-aware diff backgrounds with capability-graded palettes (#12581) 2026-02-24 11:55:01 -08:00
test_backend.rs feat: Constrain values for approval_policy (#7778) 2025-12-17 16:19:27 +00:00
text_formatting.rs feat(tui): add /statusline command for interactive status line configuration (#10546) 2026-02-05 08:50:21 -08:00
theme_picker.rs Fix codespell warning about pre-selects (#13605) 2026-03-05 10:41:58 -08:00
tooltips.rs Updated out-of-date tip about availability on free and go plans (#14471) 2026-03-12 09:12:38 -06:00
tui.rs feat(tui) /clear (#12444) 2026-02-21 22:06:56 -08:00
ui_consts.rs Fixes (#4458) 2025-09-30 00:10:04 +00:00
update_action.rs fix: use brew upgrade --cask codex to avoid warnings and ambiguity (#9823) 2026-01-26 16:21:09 -08:00
update_prompt.rs fix: update brew auto update version check (#6238) 2025-11-10 09:05:00 -08:00
updates.rs updates: use brew api for version check (#10809) 2026-02-05 15:12:27 -08:00
version.rs Added CLI version to /status output (#3223) 2025-09-05 16:27:31 -07:00
voice.rs client: extend custom CA handling across HTTPS and websocket clients (#14239) 2026-03-13 00:59:26 +00:00
wrapping.rs fix(tui): recover on owned wrap mapping mismatch (#12609) 2026-02-23 20:14:50 +00:00