Codex Markdown preview resolves nested relative links from workspace root instead of the current Markdown file

Open 💬 1 comment Opened May 7, 2026 by Ariorick

What version of the Codex App are you using (From “About Codex” dialog)?

26.429.61741

What subscription do you have?

Plus

What platform is your computer?

Darwin 21.2.0 arm64 arm

What issue are you seeing?

Codex embedded Markdown preview appears to resolve relative Markdown links from the workspace root. GitHub resolves the same links relative to the Markdown file that contains them.

This creates a mismatch: links that are valid on GitHub can fail in Codex preview when the Markdown file is inside a subdirectory. (Or reversed)

What steps can reproduce the bug?

1. Create a workspace with a repository or folder that contains nested Markdown files:

   workspace/
     repo/
       docs/
         index.md
         details.md

2. In `repo/docs/index.md`, add a relative link to the neighboring file:
   [details.md](details.md)
   Also test the explicit relative form:
   [details.md](./details.md)

3. Open `repo/docs/index.md` in Codex embedded Markdown preview.

4. Click either link.

Expected result:
The preview (or external editor) should open `repo/docs/details.md`, matching GitHub Markdown behavior.

Actual result:
The link does not open correctly. It appears to be resolved from the workspace root instead of from the directory of the Markdown file containing the link.


5. On the other side:

   [details.md](repo/docs/details.md)

Open `repo/docs/index.md` in Codex preview again and click the link.
The workspace-root-relative link opens correctly in Codex preview, even though the standard Markdown-relative links do not. 
[details.md](repo/docs/details.md)

What is the expected behavior?

https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#relative-links

Relative Markdown links in Codex embedded preview should resolve relative to the Markdown file that contains the link, matching GitHub Markdown behavior.

For example, given:

workspace/
  repo/
    docs/
      index.md
      details.md

A link inside `repo/docs/index.md` like:
[details.md](details.md)
or:
[details.md](./details.md)
should open:
workspace/repo/docs/details.md

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗