Skip to content

fix: suppress workflow commands in Codex output - #176

Open
Alanperry1 wants to merge 1 commit into
openai:mainfrom
Alanperry1:fix/sanitize-workflow-command-output
Open

fix: suppress workflow commands in Codex output#176
Alanperry1 wants to merge 1 commit into
openai:mainfrom
Alanperry1:fix/sanitize-workflow-command-output

Conversation

@Alanperry1

Copy link
Copy Markdown

Summary\n\nWrap the Codex execution step in GitHub Actions command suppression with a unique per-run token, then restore processing after the child exits. The action retains Codex's original exit code.\n\nThis prevents Codex tool and model output such as ##[add-matcher] or ::warning:: from being executed by the GitHub runner as workflow commands.\n\nFixes #175.\n\n## Validation\n\n- corepack pnpm run check\n- corepack pnpm run build\n- node --test --test-name-pattern='Codex output cannot be interpreted' test/actionHardening.test.mjs\n- git diff --check\n\nThe complete test suite was started but its existing Linux process-isolation test does not complete in this sandbox.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed777b2bca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread action.yml
shell: bash
run: |
exec env -u NODE_OPTIONS NODE_OPTIONS=--disable-sigusr1 node --disable-sigusr1 "$ACTION_PATH/dist/main.js" run-codex-exec \
workflow_command_token="codex-action-$(uuidgen)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid requiring uuidgen on every runner

On self-hosted or minimal runners where uuidgen is not installed, this substitution returns 127 and the GitHub bash shell exits before Codex is launched because it runs scripts with -e (documented shell command). The repository neither installs nor checks for uuidgen; for example, a minimal Ubuntu 24.04 environment needs the separate uuid-runtime package. Generate the token using an already guaranteed runtime such as Node, or provide a dependency-free fallback.

Useful? React with 👍 / 👎.

@digitalsense-ai

Copy link
Copy Markdown

We are also hitting this issue in a real GitHub Actions workflow using openai/codex-action. Codex completes successfully and produces its final structured result, but the action step is marked failed before downstream patch collection can run. This currently blocks our automated development pipeline. Happy to provide workflow/run details if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants