Codex is scanning the root when it's supposed to only be working in a sub-directory

Resolved 💬 3 comments Opened Feb 17, 2026 by namar0x0309 Closed Feb 17, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

The parts that are worrisome

• Ran Get-ChildItem -Force | Select-Object Name,Mode,Length
  └
    Name                      Mode  Length
    … +43 lines
    vfcompat.dll              -a--- 66328


• Ran Get-Content -Raw Curriculum.md
  └ Get-Content:
    Line |
       2 |  Get-Content -Raw Curriculum.md
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         | Cannot find path 'C:\Curriculum.md' because it does not exist.

then

I found I executed from C:\ instead of your project folder. I’ll rerun in C:\Users\<working dir path> and then scaffold from the actual
  curriculum sections.

• Running Get-Content -Raw Curriculum.md

• Ran Get-ChildItem -Force | Select-Object Name,Mode,Length
  └
    Name                      Mode  Length
    … +43 lines
    vfcompat.dll              -a--- 66328


• Ran Get-Content -Raw Curriculum.md
  └ Get-Content:
    Line |
       2 |  Get-Content -Raw <file mentioned in prompt>.md
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         | Cannot find path 'C:\<file mentioned in prompt>.md' because it does not exist.

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• The shell is ignoring the provided working directory, so I’ll explicitly Set-Location inside each command to the project path and continue.

• Running Set-Location 'C:\Users\<path to where it was launched in>'; Get-Content -Raw '<file mentioned in prompt>.md'

• Ran Set-Location 'C:\Users\<path to where it was launched in>'; Get-Location; Get-ChildItem -Force | Select-Object Name,Mode,Length
  └
    Path
    … +221 lines
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         | Access to the path 'C:\Users\<path to where it was launched in>' is denied.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 6 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #10439
  • #10451

Powered by Codex Action

etraut-openai contributor · 6 months ago

Can you please provide the information requested in the bug template? Which codex product are you using, the CLI? Which version? Which platform? How are you configuring it?

namar0x0309 · 6 months ago
Can you please provide the information requested in the bug template? Which codex product are you using, the CLI? Which version? Which platform? How are you configuring it?
  • codex-cli 0.101.0
  • Windows 24h2
  • Powershell: 5.1.26100.7705
  • model: gpt-5.3-codex medium