codex - 💡(How to fix) Fix @file path references are not being detected in Codex CLI on Ubuntu WSL [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19296Fetched 2026-04-24 10:39:07
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.124.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.3-codex high, gpt-5.4-mini high

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64 in Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows Terminal with Ubuntu WSL

What issue are you seeing?

When I reference a file or path using @ in Codex CLI, the path is not detected or passed correctly to the model.

For example, I type something like:

@/mnt/d/programacion/PHP/web/path/to/file

or I reference an image/file with @, but Codex does not seem to receive the file/path context. Instead, it starts searching or assuming unrelated things, as if the @ reference was not attached or resolved.

The model behaves as if no file was provided, even though I explicitly typed the @ path.

What steps can reproduce the bug?

  1. Open Codex CLI on Ubuntu WSL.

  2. Navigate to a project located under /mnt/d/, for example:

    /mnt/d/programacion/PHP/churrasqueria/web1.0

  3. Run Codex CLI.

  4. Send a prompt referencing a file or path using @, for example:

    Convert these images to webp: @/mnt/d/programacion/PHP/churrasqueria/web1.0/assets/image1.png

    or:

    Review this file: @/mnt/d/programacion/PHP/churrasqueria/web1.0/path/to/file.php

  5. Codex does not detect the referenced file/path.

  6. Instead of using the file context, it starts guessing, searching, or treating the prompt as if no @ reference was provided.

Uploaded thread: 019dbd37-83c9-7672-a9a8-bd060eebaebd

What is the expected behavior?

Codex CLI should detect and resolve @ file/path references correctly in Ubuntu WSL.

When I provide a valid @ path, the referenced file should be attached or passed to the model as context, so the model can operate on that exact file instead of guessing or searching unrelated files.

Additional information

The project is located inside the Windows-mounted drive under /mnt/d/.

This happens when using Ubuntu WSL. The issue appears to be that @ path references are not being forwarded/resolved correctly by Codex CLI, even when the path exists and is valid from the WSL terminal.

The CLI shows that the model changed to gpt-5.3-codex high, but the @ file reference itself does not seem to reach the model.

<img width="1129" height="449" alt="Image" src="https://github.com/user-attachments/assets/58e3d0e1-48a7-4060-b3fc-e446a6fe8c27" /> <img width="1204" height="212" alt="Image" src="https://github.com/user-attachments/assets/e9e17133-4abc-442a-8ae5-56b3080df863" /> <img width="1107" height="204" alt="Image" src="https://github.com/user-attachments/assets/d17ee355-8b5a-4bb4-a9c9-5de59bf97567" />

extent analysis

TL;DR

The issue might be related to how Codex CLI handles file paths in Ubuntu WSL, specifically with the @ symbol, and a potential workaround could involve adjusting the path format or using a different method to reference files.

Guidance

  • Verify that the file path referenced with @ is correct and accessible from the WSL terminal.
  • Try using a relative path instead of an absolute path to see if Codex CLI can resolve the file reference correctly.
  • Check if there are any known issues or limitations with Codex CLI version 0.124.0 related to file path handling in WSL.
  • Consider testing the same command in a native Linux environment to isolate if the issue is WSL-specific.

Notes

The provided information suggests the issue is specific to Ubuntu WSL and Codex CLI's handling of @ path references. Without further details on Codex CLI's internal workings or access to its documentation, it's challenging to provide a definitive solution.

Recommendation

Apply workaround: Adjust the path format or method of referencing files to see if it resolves the issue, as the current approach with @ does not seem to work as expected in the WSL environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix @file path references are not being detected in Codex CLI on Ubuntu WSL [1 comments, 2 participants]