openai / openai/codex-plugin-cc
Review jobs on Windows leave junk files in the reviewed repo (pwsh treats ">" in quoted code as a redirect)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
After review jobs on Windows I keep finding empty files in the repo root with names like s.id, r.name, fraction), tsx, process.exit(signal, 7, 71.
Each name is a token that comes right after a > or => somewhere in the code the reviewer was reading.
What happens: the reviewer runs its shell commands through PowerShell, like
"pwsh.exe" -Command '$p='"'src/core/actions/index.ts'; "'$l...
The command strings embed pieces of source code, and the quoting often comes out broken (you can see the mixed quote segments in the job log). When a > from the code lands outside the quotes, PowerShell reads it as a redirect and creates an empty file named after the next token. So reviewing a diff with an arrow function like (s) => s.id can leave a file called s.id in the repo.
Setup: Windows 11, PowerShell 7, plugin 1.0.6, Claude Code.
Repro: on Windows, review any diff that contains arrow functions. Then look at the repo root for new empty files.
Two things would fix it:
-
Run review jobs in a read-only sandbox. A review never needs to write into the repo, but right now the reviewer's commands run with no write protection on Windows. This part probably needs a change in codex itself, not just the plugin. Related: #57 and #280 show the Windows sandbox used to block PowerShell commands in review mode. Whatever fixed that seems to have dropped the write protection with it.
-
Stop defaulting to
shell: trueon Windows in the plugin's own spawns (scripts/lib/process.mjsline 12,scripts/lib/app-server.mjsline 194). Node prints DEP0190 on every run because of it.scripts/lib/git.mjsalready usesshell: falseon purpose, with a comment saying why. Note that plainshell: falsebreaks.cmdresolution (#287), so the binary path has to be resolved first. Related: #452, #417.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows review-job failure with an arrow-function diff, then inspect scripts/lib/process.mjs at line 12 and scripts/lib/app-server.mjs at line 194. Compare their spawn behavior with scripts/lib/git.mjs and its shell setting, while reviewing #57, #280, #287, #452, and #417 for constraints. Done means review jobs no longer create token-named files and the affected Windows process launches still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, powershell
- Domain
- devtools, operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100