Skip to content

Undo functionality should never depend on Git repository presence #19205

@Jean-Heng-Huang

Description

@Jean-Heng-Huang

What variant of Codex are you using?

Codex via VS Code extension (default model, not user-configurable)

What feature would you like to see?

Make "ask" mode the default, require explicit confirmation before applying any file changes, and clearly separate preview from execution to prevent unintended destructive edits.

Additional information

Undo should never depend on Git, especially when the tool can modify files automatically.

Image

In addition, undo functionality appears to depend on being inside a Git repository.

When attempting to undo changes made by the agent outside of a Git repository, the system shows an error indicating that undo requires a Git repository.

This is unexpected and problematic. Undo is a fundamental editor feature and should not depend on version control. It is expected to work as a local operation regardless of repository state.

This behavior becomes especially risky in combination with agent mode, which can directly modify or overwrite files.

As a result:

  • Files may be overwritten
  • Undo may be unavailable
  • No reliable recovery path is provided

This creates a real risk of irreversible data loss during normal development workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestextensionIssues related to the VS Code extension

    Type

    No type
    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