I have Claude run it in a terminal, not through the API. I just ask Claude to spawn a Codex terminal and send it a prompt, and Claude gets a message back when Codex finishes or gets stuck. I do that through my oss project Spaces (usespaces.dev). The steps are in this skill if you want to copy the pattern:
https://github.com/yogesh-dhande/spaces-skills/blob/main/ski...Without Spaces, tmux gets you most of the way: Claude opens a window running codex, sends the prompt with send-keys, and checks capture-pane to see when it's done.