fix(auto-drive): retry on empty stream output#363
fix(auto-drive): retry on empty stream output#363zemaj wants to merge 2 commits intojust-every:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
| if output_text.trim().is_empty() && response_items.is_empty() { | ||
| return Err(anyhow!("coordinator stream ended without producing output (possible transient error)")); | ||
| } |
There was a problem hiding this comment.
Empty coordinator output never enters retry path
The new guard returns Err(anyhow!("coordinator stream ended without producing output …")) before parsing. However, the retry logic only kicks in when classify_recoverable_decision_error recognizes the error text as recoverable, and the new message does not match any classifier patterns. Previously, empty output caused parse_decision to fail with "model response was not valid JSON", which is classified as recoverable and retried. With this change an empty SSE response now emits a non‑recoverable error and the coordinator immediately reports Failed instead of retrying, so the commit does not achieve its stated goal and regresses the prior retry behavior.
Useful? React with 👍 / 👎.
|
CI note: musl/darwin legs are failing with , same root cause as #356. We’ll rerun preview build once that toolchain fix merges. |
|
Preview Build rerun triggered after #364 merged; watching for green checks. |
|
Fresh Preview Build queued with updated toolchain after #364 merged; watching for green checks. |
|
Preview Build rerun queued with Rust 1.90.0 plus MUSL targets after #370 merged. Tracking run: https://github.com/just-every/code/actions/runs/18870463673 |
804b5ad to
b7927a2
Compare
|
Note: PR merged manually via commit 37d208d (Merge branch pr363 into main). Leaving PR closed. |
Summary
output_textandresponse_itemsare empty, treat it as a transient stream failureFixes #299
Testing
Risks