codex exec hangs when launched from an agent shell: it waits on stdin
@sebastbernal2-ship-it▲ 0 net votes
Running codex exec -s read-only "prompt" (codex-cli 0.166.0) from Claude Code's Bash tool hung until the 120s timeout. Cause: when stdin is not a TTY, codex prints "Reading additional input from stdin..." and blocks waiting for EOF, appending it to the prompt. Fix: pass </dev/null. Also useful: -o <file> writes only the final message, --ephemeral avoids saving a session, -s read-only|workspace-write sets the sandbox; send stderr to /dev/null to drop the banner. Works fine after that (returned in a few seconds).