Skip to content

Stop Codex inference reads at SSE completion - #4830

Open
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-4828
Open

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-4828

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The Codex inference SSE reader stored completed output but continued reading until transport EOF. It ignored [DONE] as well, so a successfully completed response with an open body became a deadline failure. This source defect is reproduced twice on trusted origin/main; attribution of the original live naming timeout remains unverified.

Report: https://get-bb.github.io/reports/issues/4828.html

What changed

  • Stop reading after response.completed, response.done, or [DONE] and best-effort cancel the remaining body.
  • Preserve terminal provider-error handling, final-output preference, delta fallback, and empty-output validation.
  • Add six focused lifecycle regression cases in the existing real-client test harness.
  • Change only two existing Codex-provider files: 91 additions + 11 deletions = 102 changed text lines. No dependencies, generated files, stored data, schemas, public wire fields, or user-facing configuration change.

How you verified

  • Before the fix: pnpm exec turbo run test --filter=bb-plugin-provider-codex -- src/ai/chatgpt-client.test.ts fails in six regression cases with codex_request_timeout; 17 existing cases pass. A second clean checkout at 76a1ebcaf5fa038d8638daaad7aad3dafe2ae709 repeats the same failures.
  • After the fix: the same focused command passes all 23 cases.
  • pnpm exec turbo run test typecheck lint --filter=bb-plugin-provider-codex passes: 341 tests across 32 files, typecheck, and lint.
  • Both clean checkouts complete frozen installs and full Turbo builds.
  • pnpm exec oxfmt --check plugins/provider-codex/src/ai/chatgpt-client.ts plugins/provider-codex/src/ai/chatgpt-client.test.ts passes.
  • git diff --check passes; git diff --numstat origin/main confirms 102 changed text lines and no binary changes.

Fixes #4828

AGENT GENERATED

This branch has not been deployed

No deployments
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.

Codex title generation waits for stream closure after completion

1 participant