VS Code extension should show exact in-editor change locations like Copilot, and Undo/Revert must be reliable
Description
The Codex VS Code extension feels very strong in reasoning and code editing, but two parts of the editor experience still feel significantly behind GitHub Copilot:
- It does not clearly show, inside the editor, exactly where code was changed.
- Undo/Revert is not reliable enough.
Requested improvements
Please improve the VS Code extension in two areas:
1) Better in-editor visibility of edits
Codex should make it much clearer where changes happened, ideally using the native VS Code editor and diff workflow.
What would help:
- highlight exact changed lines directly in the editor
- show inline markers / gutter markers for modified regions
- make it easy to jump to each change
- clearly show which file and which function/block was changed
- preserve a simple review flow similar to Copilot
2) Reliable Undo / Revert
Undo/Revert should be dependable and safe.
Right now, there are multiple public reports showing that undo/revert is inconsistent:
- sometimes Undo says it succeeded, but the code is not actually reverted
- sometimes “Failed to revert changes” appears
- sometimes the revert flow behaves incorrectly with Git state
- there are reports that Undo may affect staged changes in unexpected ways
- there are also reports of revert/diff state breaking or disappearing
Why this matters
For day-to-day coding, especially in legacy codebases, the missing piece is confidence.
I need to be able to:
- ask Codex to edit code
- immediately see exactly where it changed things
- quickly review the diff in the editor
- safely undo the last Codex change if needed
Without this, the reasoning quality may be strong, but the editing workflow still feels less comfortable than Copilot.
Suggested UX direction
A Copilot-like flow would help a lot:
- select code or ask Codex to modify a file
- Codex applies changes
- the changed lines are clearly highlighted in the editor
- a native diff/review view is available immediately
- Undo/Revert reliably restores only the Codex-generated changes
- Git staged/unstaged state is respected and never modified unexpectedly
Example use case
I often work with C/STM32 and PHP legacy projects.
Codex can generate good edits, but I still have to manually inspect where the changes landed, and I do not fully trust Undo/Revert to safely recover from a bad edit.
A stronger in-editor diff + reliable revert workflow would make the extension much better for real daily use.
Thanks.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
+1 on both points. I built a VSCode extension that highlights changes inline (green for additions, red insets for deletions) with per-hunk Accept/Discard. It tracks baselines independently so undo is always reliable regardless of git staging state. Works with Codex and any other CLI tool.
Uses VSCode's proposed
editorInsetsAPI so it's not on the marketplace — needs manual VSIX install.https://github.com/molon/hunkwise
<img width="2338" height="2054" alt="Image" src="https://github.com/user-attachments/assets/5b1b77ed-3759-45af-89b1-811132d7fe4c" />
Additional concrete reproduction / UX gap from real VS Code usage on Windows:
I tested Codex editing with multiple sequential file modifications in the same session, and the current recovery story still feels unsafe.
What happens in practice:
Ctrl+Zonly undoes the most recent editor step, not the whole AI change request.git restore <file>is too coarse because it restores the whole file to the last Git state, which also removes earlier good AI edits in that file.A particularly painful workflow is:
Ctrl+Zonly walks back one internal step at a time.git restoreremoves both the bad latest edit and the earlier good edit.So the missing capability is not just “undo exists”, but:
Without one of those, the current default behavior (apply code directly) creates too much risk for normal iterative editing.
In short: editor undo is too granular, Git restore is too coarse, and Codex revert is not reliable enough. The extension really needs a safe middle layer for request-scoped rollback.
As I experience using Codex in VSC, this still seems to be not possible. The line diff view that GitHub Copilot provides is desired.