Skip to content

Windows Codex batch runner breaks with codex 0.27.0 #422

@LostDaoWalker

Description

@LostDaoWalker

Repro

Windows 11 + Python 3.13 + desloppify 0.9.9 + codex 0.27.0

Run:

desloppify review --run-batches --runner codex --parallel --scan-after-import

Actual

The Codex batch runner fails before subjective review can complete.

Observed failures:

  1. The runner invokes codex exec --ephemeral ..., but current Codex CLI rejects --ephemeral:

    • error: unexpected argument '--ephemeral' found
  2. On Windows, the runner passes the full prompt as a command-line argument, which overflows command length:

    • The command line is too long.
  3. Log/payload recovery uses locale-default text decoding on Windows, which crashes on UTF-8 output:

    • UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d ...
  4. Live subprocess stdout/stderr decoding also uses locale-default decoding, which can crash the stream reader and then break the Codex child process with broken pipe.

Expected

The Codex runner should:

  • use the current Codex CLI contract
  • feed prompts through stdin (or a file) instead of command-line args
  • read logs/payloads with explicit UTF-8 decoding on Windows
  • decode live subprocess streams with explicit UTF-8 as well

Local fix that worked

I patched my local install to:

  • remove --ephemeral
  • call codex exec ... --output-last-message <file> -
  • pipe the prompt via stdin
  • set encoding="utf-8", errors="replace" for subprocess.run / Popen
  • read batch logs and payload files with explicit UTF-8

After that, single-batch review runs successfully instead of failing at startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions