The non-interactive codex exec argv. The mock-wiring -c flags
(ctx.mockArgs, from runtime.wireMock) MUST follow exec — placed before
exec they're parsed as global flags and ignored (codex falls back to the
real OpenAI provider). --ephemeral +
--dangerously-bypass-approvals-and-sandbox make it run unattended;
--skip-git-repo-check lets it run in a bare temp dir; --ignore-user-config
keeps the host's ~/.codex out. The prompt is the trailing positional.
Pure, so the arg shape is unit-tested.
The non-interactive
codex execargv. The mock-wiring-cflags (ctx.mockArgs, fromruntime.wireMock) MUST followexec— placed beforeexecthey're parsed as global flags and ignored (codex falls back to the real OpenAI provider).--ephemeral+--dangerously-bypass-approvals-and-sandboxmake it run unattended;--skip-git-repo-checklets it run in a bare temp dir;--ignore-user-configkeeps the host's~/.codexout. The prompt is the trailing positional. Pure, so the arg shape is unit-tested.