Skip to content

Backtrack shortcut and footer hint inconsistent when composer isn’t empty #5030

Closed

Description

@kgruiz

What version of Codex is running?

codex-cli 0.46.0

Which model were you using?

gpt-5-codex high

What platform is your computer?

Darwin 25.1.0 arm64 arm

What steps can reproduce the bug?

When a draft or attachment is present, pressing Esc shows a footer hint that says you can edit the previous message, but pressing Esc again does nothing. The UI advertises a shortcut that never actually works unless the composer is empty.


Description

When the composer contains text or attachments and Esc is pressed, the footer changes from

[xx]% context left · ? for shortcuts

to

esc esc to edit previous message

Pressing Esc a second time does nothing.

When the composer is empty and Esc is pressed, the footer instead shows

esc again to edit previous message

and the second Esc correctly opens the backtrack navigator.

The issue has two parts: the shortcut doesn’t work when a draft is present, and the hint is misleading because it repeats “esc esc” even though Esc has already been pressed once, when it should probably say "esc again" like the non-empty message already does.

What is the expected behavior?

Cause

In App::handle_backtrack_esc_key, backtrack only runs when the composer is empty:

// Only handle backtracking when composer is empty to avoid clobbering edits.
if self.chat_widget.composer_is_empty() { ... }

That check was originally added to prevent users from accidentally losing a draft, since confirming a backtrack replaces whatever is in the composer with an older message. Requiring the composer to be empty made that impossible.

I think backtrack should work even when the composer is not empty, especially since backtrack already requires two Esc presses to confirm. Drafts could remain untouched until confirmation.

Even if the current restriction is kept, the footer text would still be wrong, since it tells users they can edit a previous message when they actually cannot unless the composer is cleared.


Paths forward

  1. Update the footer so the edit message hint “esc esc to edit previous message” only appears when the composer is empty. It should also probably be changed to “esc again to edit previous message” to reflect the actual behavior and align with the non-empty message.
  2. Allow backtrack to prime even when the composer isn’t empty, keeping drafts intact until the user explicitly confirms to edit another message.

What do you see instead?

No response

Additional information

No response

Activity

  1. added
    bug
    on Oct 10, 2025
  2. github-actions commented on Oct 10, 2025

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. kgruiz commented on Oct 10, 2025

    @kgruiz
    ContributorAuthor

    Reviewed #4722 and it is not the same issue.

  4. added a commit that references this issue on Oct 10, 2025
    109d6f9
  5. added a commit that references this issue on Oct 15, 2025
    9b53a30
  6. added a commit that references this issue on Oct 24, 2025
    848bb5b
  7. added a commit that references this issue on Nov 10, 2025
    58f5f60
  8. heinosasshallik commented on Nov 14, 2025

    @heinosasshallik

    Also please add ctrl+t (the shortcut for showing the full transcript) to the shortcuts

  9. added a commit that references this issue on Nov 14, 2025
    033ec76
  10. added a commit that references this issue on Dec 2, 2025
    f5a36d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions