Markdown preview switches to source and jumps to top after Codex edits
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.51957
What subscription do you have?
Pro
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
When I have a Markdown document open in rendered preview mode and Codex edits the document, the viewer switches to source mode and jumps to the top of the file.
Switching to another preview tab and then back restores the rendered preview at the correct location. However, I have to repeat this after every incremental edit.
This breaks collaborative document editing. I want to read and comment on one section while Codex continues updating other sections, but every edit interrupts my reading and loses my place. In practice, I have to wait until Codex finishes working before I can continue reviewing the document.
What steps can reproduce the bug?
- Open a Markdown file in the Codex app.
- Switch the file viewer to rendered preview mode.
- Scroll partway through the document.
- Ask Codex to edit the open document.
- Keep reading the preview while Codex applies the edit.
- Observe that the viewer switches to Markdown source mode and jumps to the top.
This happens repeatedly when Codex makes multiple incremental edits.
What is the expected behavior?
When Codex changes an open Markdown document, the viewer should:
- Remain in rendered preview mode.
- Refresh the rendered contents automatically.
- Preserve the current scroll position or reading anchor where possible.
- Allow me to continue reading while Codex works on the document.
Additional information
Switching to another preview tab and back restores both the rendered preview and the correct reading position. This suggests the preview state is retained, but the wrong viewer becomes active after the file update.
This is particularly disruptive when collaboratively building a document with Codex: I should be able to read and review one section while Codex edits another.
Related issues:
- #22095 covers preserving the file viewer’s scroll position after edits.
- #18129 covers refreshing an open file after AI modifications.
- #24399 requests live refresh for rendered Markdown documents.
This bug is specifically about an update forcibly switching the active Markdown viewer from rendered preview to source mode, as well as moving the user to the top.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗