Skip to content

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

Closed as duplicate

Description

@namar0x0309

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.

Activity

  1. added
    bug
    CLI
    on Feb 17, 2026
  2. github-actions commented on Feb 17, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. etraut-openai commented on Feb 17, 2026

    @etraut-openai
    Contributor

    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?

  4. namar0x0309 commented on Feb 17, 2026

    @namar0x0309
    Author

    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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions