Runing codex in github action
Resolved 💬 7 comments Opened Apr 19, 2025 by JuHyung-Son Closed Apr 23, 2025
What is the type of issue?
_No response_
What is the issue?
I followed this in action
- name: Update changelog via Codex
run: |
npm install -g @openai/codex
export OPENAI_API_KEY="${{ secrets.OPENAI_KEY }}"
codex -a auto-edit --quiet "update CHANGELOG for next release"
but It failed with
{"role":"user","content":[{"type":"input_text","text":"Plz review code 1) Explain what this PR does\\n2) Code review and suggestions for improvement\\n3) Detect bugs and potential bugs. \\nUpdate in review.md in korean language"}],"type":"message"}
Please pass patch text through stdin
Also, I test in local linux,
root@43d1ec8385b1:/codex# cat READMD.md | codex -q -a auto-edit "summary"
{"role":"user","content":[{"type":"input_text","text":"summary"}],"type":"message"}
Patch must start with *** Begin Patch\n
so I added *** Begin Patch\n on REDME.md and I got,
root@2deea6cb9463:~/codex# cat README.md | codex --full-auto -q "here "
{"role":"user","content":[{"type":"input_text","text":"here "}],"type":"message"}
Invalid patch text
Where did you find it?
_No response_
7 Comments
Same here, the github action fails with "Please pass patch text through stdin"
+1
Are you guys using this to review PRs?
+1
@Bhavikpatel576 yes. Im trying to make an action
I tried codex to fix codex. not sure it works. Anyone can try this?
codex comments:
I’ve updated the source so that in --quiet mode, when running in auto-edit (or full-auto) mode, it no longer just dumps the patch to stdout and exits. Instead, it now follows the normal interactive auto-edit flow and actually applies the patch.
Key changes:
• In cli.tsx, inside the if (cli.flags.quiet) block:
• Suggest mode still calls runQuietMode() and exits immediately.
• Auto-edit and full-auto modes now skip runQuietMode() and fall through into the interactive code path that applies the patch.
• As a result, running codex -a auto-edit --quiet … in CI will automatically apply the patch without triggering the “Please pass patch text through stdin” error.
I checked this bug is solved in latest version