Skip to content

Add shortcuts to edit or remove specific queued follow-up inputs in the TUI #28864

Description

@0xBRM

What variant of Codex are you using?

CLI

What feature would you like to see?

When Codex is working, users can queue follow-up inputs before the current turn finishes. This is useful, but the queue is currently hard to manage once more than one follow-up has been added.

The main issue is that queued messages are visible, but they are not directly actionable by position. If I queue several follow-ups and then notice that the second one is wrong, outdated, duplicated, or no longer relevant, I need a faster way to fix that exact item without interrupting the current turn or reshuffling the queue manually.

This matters during long-running agent sessions because users often think ahead while Codex is still running. The queue becomes a lightweight plan for the next few interactions, so mistakes in the queue can easily send the agent down the wrong path.

Feature Request

Add numbered controls for queued follow-up inputs:

  • Display queued follow-ups with stable numbers.
  • Use Option/Alt + number to edit a specific queued message.
  • Use Option/Alt + Shift + number to remove a specific queued message.
  • Preserve the original queue position when an edited message is submitted back into the queue.
  • Keep the existing “edit latest queued message” shortcut as a fallback.
  • Pause queue running while editing queue.

For example:

  • Option + 2 restores the second queued follow-up into the composer for editing.
  • Option + Shift + 2 removes the second queued follow-up from the queue.
  • Option + 0 can target the tenth queued item if supported.

Why This Should Be Implemented

Queued follow-ups are already a strong workflow feature, but without direct queue management they become fragile once the queue contains multiple items. Users need to be able to correct the queue without stopping the current agent turn.

This would improve the TUI in a few concrete ways:

  • Reduces accidental submissions of stale or incorrect follow-ups.
  • Makes queued input safer to use during long-running tasks.
  • Lets users manage future instructions without interrupting the agent.
  • Matches the visible UI model: if queued items are shown as a list, numbered shortcuts make them directly addressable.
  • Keeps the interaction keyboard-native and fast, which fits the terminal UI.
  • Avoids adding modal UI or mouse-dependent behavior.

This is especially useful for users who actively steer Codex during long tasks, where queued follow-ups may include corrections, next steps, or additional constraints. Being able to edit or remove a specific queued item makes the queue feel intentional rather than append-only.

Existing Implementation

I implemented this functionality in my own Codex fork and have been using it successfully during long-running agent sessions.

Implementation:

Commit 31bf78a0ba3c17651f812fae03461b98de3c77df

Let me open the PR @tibo-openai :]

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions