Skip to content

[Bug] OpenGateway empty-completion recovery can discard lifecycle snapshot output #8333

Closed

Description

@lidge-jun

Client or integration

Direct HTTP/API client

Area

Streaming

Summary

The OpenGateway empty-completion guard may discard lifecycle snapshot output evidence when a later completed snapshot is empty. The guard can classify the completion as empty and send a replacement despite the earlier frame carrying output outside its response.output array.

Reproduction

Source-inspected scenario; a live HTTP reproduction has not been run:

  1. Send a self-contained streaming Responses request to the OpenGateway native endpoint with empty-completion recovery enabled.
  2. Return a response.created frame containing response.output: [] and response.output_text: "already produced", then a well-formed response.completed with empty output.
  3. In the source below, lifecycle classification checks response.output but not response.output_text; the later empty terminal can enter replacement recovery.

Expected: preserve the original stream and avoid a replacement when the lifecycle snapshot contains output or ambiguous output evidence.

Version

Source inspected at commit c61e957; the behavior predates #8292.

Operating system

Platform-independent source path; live behavior has not been measured.

Provider and model

OpenGateway native Responses; no model-specific claim.

Logs or error output

No live logs captured. Source: https://github.com/lidge-jun/opencodex/blob/c61e9579004c975ea8d35d43f48df19f78da4e04/src/server/responses/opengateway-completion-guard.ts

Screenshots and supporting files

No live capture yet.

Redacted configuration

OpenGateway Responses with empty-completion recovery enabled and a self-contained request; no credentials are needed to inspect the source.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bug
    on Nov 8, 2026
  2. coderabbitai commented on Nov 8, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #7474 - [WRONG BRANCH] release: promote dev 845ac6b to main as 2.90.0 [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. added
    streaming
    on Nov 8, 2026
  4. added a commit that references this issue on Nov 9, 2026
    0428e0d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstreaming

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions