Codex CLI Adds Configurable Undo and Redo Shortcuts to the Prompt Composer

CodexView original changelog

Codex CLI 0.171.0 added configurable undo and redo shortcuts to the standard (non-Vim) prompt composer. Undoing now also restores attachments and large pasted content, so an accidental edit or deletion no longer costs the developer their context. Vim-mode users are unaffected, since the change targets the default composer.

Key Takeaways

  • Undo and redo now work in the Codex CLI prompt composer, removing a long-standing annoyance when drafting long prompts.
  • Attachments and large pastes are restored on undo, so clearing the composer no longer destroys expensive context.
  • Shortcuts are configurable, which helps avoid collisions with terminal or multiplexer key bindings.
  • The change targets the non-Vim composer, leaving Vim-mode editing unchanged.
  • It shipped in Codex CLI 0.171.0 on 2026-11-20 together with the TUI workspace default.
  • It is a small quality-of-life change that complements the larger workspace and remote control updates in the same release.

Undo and redo arrive in the prompt composer

Codex CLI 0.171.0 added configurable undo and redo shortcuts to the non-Vim prompt composer. Until now, a mistaken deletion or an accidental overwrite while drafting a long prompt was hard to reverse. The composer now keeps an edit history that can be stepped backward and forward with keyboard shortcuts.

Attachments and large pastes are restored too

The undo behavior is not limited to typed text. According to the release notes, undo and redo also restore attachments and large pastes. In practice, a developer who clears a composer containing an attached image or a big block of pasted logs can bring it all back. That matters because those items are often the most expensive part of a prompt to rebuild.

Configurable bindings

The shortcuts are configurable, so developers can map undo and redo to whatever keys fit their terminal and muscle memory. This is useful in terminals and multiplexers where default bindings collide with other tools. The change applies to the standard composer, while Vim-mode users keep their existing editing model.

Where it shipped

The feature is part of Codex CLI 0.171.0, released on 2026-11-20 alongside the TUI workspace becoming the default and the new remote control commands.

Codex CLI Adds Undo and Redo to the Prompt Composer | Yet Another Changelog