Skip to content

fix(responses): deliver native stream failures as response.failed - #502

Merged
qxcnm merged 2 commits into
qxcnm:mainfrom
serein431:fix/native-responses-terminal-errors
Oct 15, 2026
Merged

qxcnm merged 2 commits into
qxcnm:mainfrom
serein431:fix/native-responses-terminal-errors

Conversation

@serein431

Copy link
Copy Markdown
Contributor

Summary

The native /v1/responses passthrough reader can observe an upstream terminal error event while forwarding it unchanged. Codex ignores most generic error events and, on EOF, replaces the useful upstream message with stream closed before response.completed.

After the upstream stream ends, emit a standard response.failed SSE frame whenever the collector has a terminal error but no Responses terminal event was delivered. This also covers read errors, disconnects, and idle timeouts. Already delivered response.failed, response.incomplete, and response.completed frames are not duplicated or changed.

This preserves the original upstream error and makes it visible to the client; it does not change the upstream service failure itself. Related report: #501.

Tests

  • cargo test --locked -p codexmanager-service --lib openai_responses -- --test-threads=1 (27 passed)
  • cargo fmt --all -- --check
  • git diff --check
  • pnpm -C apps run build:desktop
  • macOS arm64 Tauri app bundle build and code signature verification

@qxcnm
qxcnm merged commit 81bc54f into qxcnm:main Oct 15, 2026
3 checks passed
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.

2 participants