codex - 💡(How to fix) Fix Windows PowerShell: Codex should quote paths containing parentheses like Next.js app/(main)

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…
RAW_BUFFERClick to expand / collapse

Codex CLI sometimes generates shell commands on Windows PowerShell with unquoted paths that contain parentheses, such as Next.js route group paths:

rg test iPlantMES/apps/web/app/(main)/admin -S

In PowerShell, (main) is not treated as a literal path segment. It is parsed as an expression/command token. On Windows, main resolves to:

C:\Windows\System32\main.cpl

So this can unexpectedly open the Mouse Properties control panel, or split the path incorrectly.

Environment:

  • Codex CLI: 0.129.0
  • OS: Windows
  • Shell: Windows PowerShell 5.1.26100.8115
  • Node: v22.14.0
  • Project type: Next.js app router with route group folder (main)

Reproduction:

  1. In a Windows PowerShell environment, use a project path containing app/(main)/admin.
  2. Ask Codex to inspect/search files under that path.
  3. Codex may emit a command like: rg test iPlantMES/apps/web/app/(main)/admin -S
  4. PowerShell parses (main) instead of treating it as a literal path.

Observed:

  • The path is split incorrectly.
  • In some cases Windows opens Mouse Properties via main.cpl.

Expected: Codex should quote or escape paths containing PowerShell metacharacters, for example:

rg test 'iPlantMES/apps/web/app/(main)/admin' -S

or otherwise use safe path passing on Windows PowerShell.

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