Skip to content

[Feature]: Esc to pop a just-sent message back into the composer #6219

Description

@asfires

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/server

Problem or use case

After sending a prompt, especially when working quickly, I often immediately realize that there's something I want to change in the prompt. I'm able to do this in Claude Code and I want to be able to do it in T3 Code, too.

The composer currently clears on send and the message moves into the conversation. Going back to the world in which you didn't send the message is clunky and requires clicking the stop button in the composer, copying the message back into the composer, reverting the conversation, and copying the originally-sent prompt back into the composer. There's no quick “undo send” functionality that allows returning the most recently sent message to the composer while it's still on the current message.

Proposed solution

When the most recent user message is eligible to be recalled, pressing Esc should move it back into the composer as an editable draft. It should work for both new threads and existing threads with messages in them.

The restored draft should preserve everything that can be re-sent, including:

  • Prompt text, including styled "@" file paths, urls, etc.
  • Image or file attachments
  • Relevant composer context

It's a narrow, immediate undo for the message that the user just sent that's only available between the user sending the message and the assistant finishing thinking--just like in Claude Code. It should not be available once the assistant has fully started its turn.

Why this matters

Sending and immediately retracting a prompt for correction is a very common interaction when directing coding agents. Making that correction a single keystroke keeps the user in the keyboard flow and avoids needing to manually reconstruct the prompt. It also makes sending feel less irreversible/committed if the user can act quickly without worrying that a typo or premature submission will require a full rewind/reversion or manual copy/paste.

Smallest useful scope

The ability to recall the most recently sent message with Esc in the window between sending the message and when the assistant finishes thinking. This would only need to work for Claude and Codex messages only since I don't currently use any other providers.

Alternatives considered

  • Stopping the assistant's turn, copying your last message into the composer, and saying "meant to say this instead:" followed by your edits.
  • Reverting the conversation to the most recent assistant message or starting a new thread if there is none.

Risks or tradeoffs

  • Esc is already used to close dialogs, menus, etc. but those are unlikely to be open or otherwise interfere during the window that Esc-to-recall would work.
  • The recalled message cannot be destroyed.

Examples or references

Working demo on my branch:

Screencast.from.2026-08-11.19-20-30.webm

Related-but-distinct upstream work:

Contribution

  • I would be open to helping implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequested improvement or new capability.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions