CodexWrapper.Runner.Port (CodexWrapper v0.4.0)

Copy Markdown View Source

Default runner: a /bin/sh Port with stdin redirected from /dev/null (Codex CLI hangs if stdin is inherited from the parent), wrapped in a Task for timeout enforcement.

This is the execution path the library has always used. On a timeout it brutal-kills the Task, which closes the port but sends no signal to the OS process group. codex and any subprocess it spawned (stdio MCP servers, tool helpers) may keep running until they next touch a closed pipe. For strict termination, use CodexWrapper.Runner.Forcola (see CodexWrapper.Runner and #48).

stream_lines/4 uses the same /bin/sh wrapper in :line mode, and treats timeout as an idle bound: the wait for the next line, not for the whole run. That is what the streaming paths have always done.