Skip to content

Undo code #4487

Closed as duplicate
Closed as duplicate

Description

@Lzzzs

What feature would you like to see?

In the Codex CLI, there are times when a generation produces unwanted changes, but there’s currently no way to roll back the edits from a specific conversation.

Are you interested in implementing this feature?

No response

Additional information

No response

Activity

  1. xzec commented on Oct 2, 2025

    @xzec

    Good idea. The only way to achieve "undo" now is to commit every agent's change to VCS and drop the commit if needed.

    I suggest adding /undo and /redo commands like opencode is doing it.

  2. collimarco commented on Oct 2, 2025

    @collimarco

    +1 This feature is absolutely necessary! You cannot commit code for every message in the conversation...

  3. morganavr commented on Nov 2, 2025

    @morganavr

    this feature would be a life saver!

  4. Abenezer0001 commented on Nov 3, 2025

    @Abenezer0001

    why isnt this available yet , its very much needed

  5. changed the title [-]cli support undo code[/-] [+]Undo code[/+] on Nov 13, 2025
  6. marked Undo message #8373 as a duplicate of this issue on Dec 21, 2025
  7. melohagan commented on Jan 8, 2026

    @melohagan

    I would like to see the /undo command return as it's very useful. Sometimes you give a sub-optimal prompt, or you need to change the model for the particular task, and you need to try again.

  8. ericmeadows commented on Jan 9, 2026

    @ericmeadows

    The feature that would be best on this is a near-clone of what Claude does. You sometimes work on a bug and then you are wanting to jump to a past point in history that you branched off to fix a bug. This makes sense as a dev, because this is how we work. Additionally, sometimes you want to revert the conversation and the code - so, not just the work output, but the actual conversation as well. You never want to revert the code and not the conversation, I believe.

  9. melohagan commented on Jan 9, 2026

    @melohagan

    You never want to revert the code and not the conversation, I believe.

    I would agree with this.

  10. etraut-openai commented on Jan 31, 2026

    @etraut-openai
    Contributor

    I'm going to close this in favor of #9203

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions