Codex strips quotes from file paths, breaking commands with spaces

Resolved 💬 2 comments Opened Dec 2, 2025 by Enteleform Closed Mar 29, 2026

What version of Codex is running?

codex-cli 0.63.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.1-codex-mini (reasoning medium, summaries auto)

What platform is your computer?

Linux 6.17.8-300.fc43.x86_64 x86_64 unknown

What issue are you seeing?

Codex appears to incorrectly strip or ignore quotes around file paths when forming internal shell commands. When provided with an instruction referencing a quoted path that contains spaces (e.g., "._AI/Plans/Fold Manager/Specification.md"), Codex generates a command like:

cat ._AI/Plans/Fold Manager/Specification.md

This causes the path to be split at the space and produces errors such as “No such file or directory,” even though the file exists in the workspace. Codex later finds the file via project search, which confirms the issue is with path handling during command generation, not with file presence.

This creates misleading errors and unnecessary exploration steps.

<img width="905" height="552" alt="Image" src="https://github.com/user-attachments/assets/26dcf13b-0af1-43f2-92b3-507addb6633a" />

What steps can reproduce the bug?

  1. In a Codex session, reference a file path containing spaces, wrapped in quotes:

``
implement "path/with space/file.md"
``

  1. Codex attempts to cat the file using an unquoted path.
  2. Shell errors occur because the command is interpreted as multiple arguments.
  3. Codex then searches the workspace and successfully finds the file.

This behavior reproduces reliably with any space-containing path.

What is the expected behavior?

Codex should correctly handle file paths containing spaces by preserving quotes or escaping them so the shell interprets the path as a single argument, avoiding false “No such file or directory” errors.

Additional information

This issue seems isolated to the command-generation layer used in execution traces. Correct quoting or escaping would eliminate the false negatives and reduce noisy output during workflow navigation.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗