codex - ✅(Solved) Fix ctrl+d in /side should exit the side chat, not exit codex [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20264Fetched 2026-04-30 06:30:55
View on GitHub
Comments
2
Participants
2
Timeline
9
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2closed ×1cross-referenced ×1

Root Cause

I was in a side chat and hit ctrl+d expecting it to exit out of the layer into the root layer of chat, but codex exited. Side chats are similar to a subshell in a shell, so ctrl+d should be an unwind / exit layer rather than a quit command here (or at least prompt). The Impact of not doing this is loss of CoT on the main chat because it's not reloaded when running resume.

Fix Action

Fixed

PR fix notes

PR #20282: tui: return from side chat on Ctrl-D

Description (problem / solution / changelog)

Why

Fixes #20264.

Side conversations are an ephemeral layer on top of the main chat. Pressing Ctrl+D from an empty side-chat composer should unwind back to the parent thread, matching the existing side-return behavior, instead of falling through to the global quit shortcut and exiting Codex.

What changed

The side-return shortcut matcher now treats Ctrl+D the same way it already treats Esc and Ctrl+C. Because app-level side-return handling runs before the chat widget's global quit handling, this returns from /side while preserving normal Ctrl+D quit behavior outside side conversations.

The existing shortcut coverage was updated to include lowercase and uppercase Ctrl+D key events.

Verification

  • cargo test -p codex-tui side_return_shortcuts_match_esc_ctrl_c_and_ctrl_d
  • cargo test -p codex-tui starts successfully and the new shortcut test passes, but the broader suite later aborts in the unrelated existing test app::tests::attach_live_thread_for_selection_rejects_unmaterialized_fallback_threads with a stack overflow.

Changed files

  • codex-rs/tui/src/app/platform_actions.rs (modified, +11/-3)
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

cli

What feature would you like to see?

I was in a side chat and hit ctrl+d expecting it to exit out of the layer into the root layer of chat, but codex exited. Side chats are similar to a subshell in a shell, so ctrl+d should be an unwind / exit layer rather than a quit command here (or at least prompt). The Impact of not doing this is loss of CoT on the main chat because it's not reloaded when running resume.

Additional information

No response

extent analysis

TL;DR

Modify the behavior of Ctrl+D in side chats to unwind/exit the layer instead of quitting Codex.

Guidance

  • Review the current keybinding configuration for Ctrl+D in the Codex CLI to understand its default behavior.
  • Consider adding a custom keybinding or modifying the existing one to change the behavior of Ctrl+D in side chats.
  • Investigate if there are any existing settings or flags that can be used to achieve the desired behavior without modifying the keybindings.
  • Test the modified keybinding in a controlled environment to ensure it works as expected and does not introduce any unintended consequences.

Notes

The solution may require changes to the Codex configuration or keybindings, which could have varying levels of complexity depending on the specific implementation.

Recommendation

Apply workaround: Modify the keybinding for Ctrl+D in side chats, as it is likely that the current behavior is not intended for this specific use case.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - ✅(Solved) Fix ctrl+d in /side should exit the side chat, not exit codex [1 pull requests, 2 comments, 2 participants]