Skip to content

Codex engine fails on self-hosted runner: vendored codex-x86_64-unknown-linux-musl binary does not support --dangerously-bypass-approvals-and-sandbox #20157

@tomasmed

Description

@tomasmed

Description

When running a workflow with engine: codex on a self-hosted Linux runner, the agent step
fails with:

error: unexpected argument '--dangerously-bypass-approvals-and-sandbox' found
tip: to pass '--dangerously-bypass-approvals-and-sandbox' as a value, use
'-- --dangerously-bypass-approvals-and-sandbox'
Usage: codex-x86_64-unknown-linux-musl exec [OPTIONS]

Steps to reproduce

  1. Configure a self-hosted Linux runner (WSL2 on Windows)
  2. Create a workflow with engine: codex and runs-on: ['self-hosted', 'Linux']
  3. Trigger the workflow
  4. The "Install Codex" step runs npm install -g @openai/codex@latest successfully
  5. The agent container then calls codex exec --dangerously-bypass-approvals-and-sandbox
    against the vendored codex-x86_64-unknown-linux-musl Rust binary
  6. That binary only supports --full-auto, not --dangerously-bypass-approvals-and-sandbox

Expected behaviour

Agent executes successfully using the installed Codex binary.

Actual behaviour

Binary rejects the flag and exits with code 2.

Environment

  • gh-aw agent container: ghcr.io/github/gh-aw-firewall/agent:0.23.0
  • Runner OS: Ubuntu (WSL2 on Windows 11)
  • @openai/codex: latest (installed by gh-aw's own Install Codex step)
  • The vendored Rust binary codex-x86_64-unknown-linux-musl exec --help shows
    --full-auto but not --dangerously-bypass-approvals-and-sandbox

Notes

The host-installed codex binary at /home/USER/.nvm/versions/node/v22.22.1/bin/codex
DOES support the flag — the issue is specific to the vendored musl binary used inside
the agent container.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions