Skip to content

Recover valid Codex stdout when output artifact is incomplete #745

Description

@randomparity

Problem

The Codex review runner can receive a nonzero exit after Codex emits a valid JSON assessment on stdout while the file supplied through -o is incomplete by one closing brace. The runner currently rejects the batch before its existing stdout recovery path is reached.

Reproduction

Run a Codex holistic review batch whose output file is incomplete but whose captured stdout validates as the requested JSON object. The batch is recorded as failed even though stdout contains an importable assessment.

Proposed fix

When a runner exits nonzero, attempt the existing stdout/stderr fallback recovery and validate the recovered payload before treating it as a failed batch. A focused regression test and the full review test suite passed locally for this change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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