Codex CLI kept stumbling on PowerShell quoting
Codex CLI repeatedly ran into similar command failures over several days. The main problem was how PowerShell handled quotes, variables, and special characters.
A variable named `$p` disappeared before PowerShell could use it, and the `|` character inside a regex was treated the wrong way. Similar quoting problems affected log reading, file searches, database commands, and build checks.
Codex kept explaining the same class of failure and trying again, then moved toward using a single-quoted so variables would reach the real command. The issue was not mainly the project code itself, but the around the commands.
Key points
- Codex CLI repeatedly failed on Power quoting.
- The `$p` variable disappeared before PowerShell could use it.
- The `|` character inside a regex was interpreted incorrectly.
- Log reads, file searches, database commands, and build checks hit similar problems.
- A single-quoted was used as the next fix direction.