Skip to content

Add shortcut (Esc) to quickly reset current input prompt #2960

@dpolivaev

Description

@dpolivaev

What feature would you like to see?

When using codex in interactive mode, if I paste or type a long prompt by mistake, there is currently no way to quickly clear it. The only option is to manually delete the text character by character, which is slow and frustrating, especially with multi-line pasted text.

Proposed solution:
Introduce a shortcut to reset the current input line, similar to Claude Code’s behavior. Pressing Esc should instantly clear the entire prompt buffer and return me to an empty line.

Benefits:

  • Saves time when correcting mistakes.
  • Prevents the need to hold backspace or re-open the session.
  • Matches user expectations from comparable tools.

Alternatives considered:

  • Using Ctrl+U or Ctrl+W (standard readline shortcuts) is not as intuitive or discoverable as Esc.
  • Restarting the cli session is disruptive.

Are you interested in implementing this feature?

I could try.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions