fix(codex): require final evidence in oneshot - #5
Conversation
9f28d93 to
deaf0be
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f28d93241
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -277,15 +277,19 @@ def run_oneshot( | |||
|
|
|||
| _write_usage_file(usage_file, result) | |||
|
|
|||
| if result.get("failed") or result.get("partial") or result.get("completed") is False: | |||
There was a problem hiding this comment.
Reject non-completed Codex turn statuses
When app-server emits turn/completed with status="interrupted" (or another non-completed status without an error object), run_turn() leaves TurnResult.interrupted false and error unset: it explicitly exempts interrupted, and only records other failures when error is present. Consequently run_codex_app_server_turn() reports completed=True and partial=False, so this new guard does not fire and hermes -z can still emit an earlier partial final_text with exit code 0. Propagate every non-completed terminal status into the result flags before relying on them here.
AGENTS.md reference: AGENTS.md:L54-L57
Useful? React with 👍 / 👎.
deaf0be to
d66cd05
Compare
Summary
turn/completed; text alone no longer converts a timed-out turn into successhermes -zfail closed on failed, partial, or explicitly incomplete runs without emitting partial stdoutEvidence
turn_aborted, with nofinal_answerNousResearch/hermes-agent:mainstill contains the affected contracts as of 2026-07-31git diff --checkpassedRuntime
No Hermes service/runtime deployment is included in this PR.