Skip to content

fix(proposer): reject replies from failed CLI processes - #235

Open
OUAO-FRANK wants to merge 1 commit into
google-research:mainfrom
OUAO-FRANK:codex/issue-234-proposer-nonzero-exit
Open

OUAO-FRANK wants to merge 1 commit into
google-research:mainfrom
OUAO-FRANK:codex/issue-234-proposer-nonzero-exit

Conversation

@OUAO-FRANK

Copy link
Copy Markdown
Contributor

Problem

A proposer process that exits non-zero can still leave assistant text or output/answer.md. OpenCode replies without a structured error event and Claude JSON results with nonempty text were accepted despite that exit status, skipping retries and creating a successful audit-cache entry from a failed session.

Change

Reject non-zero exit codes before accepting either reply source. Preserve the parsed attempt cost so failed-call accounting and subsequent retry totals remain correct. Exit0 handling and the existing structured-error checks remain unchanged.

Fixes #234.

Validation

Linux, Python3.12.3, base6868817:

  • python3 -m unittest discover -s tests -v:73 tests pass.
  • Focused regression passes3 consecutive runs; exact original proposer implementation restores5 failing subcases (file/stdout/Claude failure and both retry cases).
  • ruff check harness2 tests and ruff format --check harness2/core/proposer.py tests/test_proposer_exit.py:pass.
  • python3 -m compileall -q harness2 tests; git diff --check:pass.

Tests launch local executable protocol stand-ins through real Proposer.call; no executor checkout or model API is used. They cover both channels, retained0.25 cost on failure, no successful cached reply, exit0 controls and a failed-then-successful retry totaling0.5. Initial Linux export checks failed because Windows Git converted the archive to CRLF; re-exporting the exact tracked blobs with core.autocrlf=false restored the original fixture hashes and Shell scripts, without source/fixture/CI changes.

Related: merged#13 rejects structured OpenCode session errors, while this fixes process-status failures without such events. Open#183 retains timeout spend and concerns a different path.

AI assistance: OpenAI Codex investigated, implemented and tested the change and drafted this description. No live provider behavior or human self-review is claimed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposer accepts and caches partial replies from non-zero CLI exits

1 participant